From abe885cbfcf83789eba9f10a2df05ba5dc1665bd Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Sep 2024 12:56:35 +0300 Subject: [PATCH 01/46] Codegen: CMS Blogs clients. --- .../cms/blogs/blog_posts/apis/BlogPostsApi.ts | 2 +- .../models/AttachToLangPrimaryRequestVNext.ts | 764 +++++++++++++++++- .../cms/blogs/blog_posts/models/BlogPost.ts | 29 +- .../blog_posts/models/BreakpointStyles.ts | 48 ++ .../models/ContentLanguageVariation.ts | 7 + .../blog_posts/models/ObjectSerializer.ts | 6 +- codegen/cms/blogs/blog_posts/models/Styles.ts | 8 + codegen/cms/blogs/blog_posts/models/all.ts | 1 + .../blogs/blog_posts/types/ObjectParamAPI.ts | 4 +- .../blogs/blog_posts/types/ObservableAPI.ts | 4 +- .../cms/blogs/blog_posts/types/PromiseAPI.ts | 4 +- 11 files changed, 855 insertions(+), 22 deletions(-) create mode 100644 codegen/cms/blogs/blog_posts/models/BreakpointStyles.ts diff --git a/codegen/cms/blogs/blog_posts/apis/BlogPostsApi.ts b/codegen/cms/blogs/blog_posts/apis/BlogPostsApi.ts index 8cc84ca4e..7ee150d7b 100644 --- a/codegen/cms/blogs/blog_posts/apis/BlogPostsApi.ts +++ b/codegen/cms/blogs/blog_posts/apis/BlogPostsApi.ts @@ -985,7 +985,7 @@ export class BlogPostsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param setNewLanguagePrimaryRequestVNext The JSON representation of the SetNewLanguagePrimaryRequest object. */ diff --git a/codegen/cms/blogs/blog_posts/models/AttachToLangPrimaryRequestVNext.ts b/codegen/cms/blogs/blog_posts/models/AttachToLangPrimaryRequestVNext.ts index 5127bec51..ac920de58 100644 --- a/codegen/cms/blogs/blog_posts/models/AttachToLangPrimaryRequestVNext.ts +++ b/codegen/cms/blogs/blog_posts/models/AttachToLangPrimaryRequestVNext.ts @@ -18,7 +18,7 @@ export class AttachToLangPrimaryRequestVNext { /** * Designated language of the object to add to a multi-language group. */ - 'language': string; + 'language': AttachToLangPrimaryRequestVNextLanguageEnum; /** * ID of the object to add to a multi-language group. */ @@ -38,7 +38,7 @@ export class AttachToLangPrimaryRequestVNext { { "name": "language", "baseName": "language", - "type": "string", + "type": "AttachToLangPrimaryRequestVNextLanguageEnum", "format": "" }, { @@ -68,3 +68,763 @@ export class AttachToLangPrimaryRequestVNext { } } + +export enum AttachToLangPrimaryRequestVNextLanguageEnum { + Af = 'af', + AfNa = 'af-na', + AfZa = 'af-za', + Agq = 'agq', + AgqCm = 'agq-cm', + Ak = 'ak', + AkGh = 'ak-gh', + Am = 'am', + AmEt = 'am-et', + Ar = 'ar', + Ar001 = 'ar-001', + ArAe = 'ar-ae', + ArBh = 'ar-bh', + ArDj = 'ar-dj', + ArDz = 'ar-dz', + ArEg = 'ar-eg', + ArEh = 'ar-eh', + ArEr = 'ar-er', + ArIl = 'ar-il', + ArIq = 'ar-iq', + ArJo = 'ar-jo', + ArKm = 'ar-km', + ArKw = 'ar-kw', + ArLb = 'ar-lb', + ArLy = 'ar-ly', + ArMa = 'ar-ma', + ArMr = 'ar-mr', + ArOm = 'ar-om', + ArPs = 'ar-ps', + ArQa = 'ar-qa', + ArSa = 'ar-sa', + ArSd = 'ar-sd', + ArSo = 'ar-so', + ArSs = 'ar-ss', + ArSy = 'ar-sy', + ArTd = 'ar-td', + ArTn = 'ar-tn', + ArYe = 'ar-ye', + As = 'as', + AsIn = 'as-in', + Asa = 'asa', + AsaTz = 'asa-tz', + Ast = 'ast', + AstEs = 'ast-es', + Az = 'az', + AzAz = 'az-az', + Bas = 'bas', + BasCm = 'bas-cm', + Be = 'be', + BeBy = 'be-by', + Bem = 'bem', + BemZm = 'bem-zm', + Bez = 'bez', + BezTz = 'bez-tz', + Bg = 'bg', + BgBg = 'bg-bg', + Bm = 'bm', + BmMl = 'bm-ml', + Bn = 'bn', + BnBd = 'bn-bd', + BnIn = 'bn-in', + Bo = 'bo', + BoCn = 'bo-cn', + BoIn = 'bo-in', + Br = 'br', + BrFr = 'br-fr', + Brx = 'brx', + BrxIn = 'brx-in', + Bs = 'bs', + BsBa = 'bs-ba', + Ca = 'ca', + CaAd = 'ca-ad', + CaEs = 'ca-es', + CaFr = 'ca-fr', + CaIt = 'ca-it', + Ccp = 'ccp', + CcpBd = 'ccp-bd', + CcpIn = 'ccp-in', + Ce = 'ce', + CeRu = 'ce-ru', + Ceb = 'ceb', + CebPh = 'ceb-ph', + Cgg = 'cgg', + CggUg = 'cgg-ug', + Chr = 'chr', + ChrUs = 'chr-us', + Ckb = 'ckb', + CkbIq = 'ckb-iq', + CkbIr = 'ckb-ir', + Cs = 'cs', + CsCz = 'cs-cz', + Cu = 'cu', + CuRu = 'cu-ru', + Cy = 'cy', + CyGb = 'cy-gb', + Da = 'da', + DaDk = 'da-dk', + DaGl = 'da-gl', + Dav = 'dav', + DavKe = 'dav-ke', + De = 'de', + DeAt = 'de-at', + DeBe = 'de-be', + DeCh = 'de-ch', + DeDe = 'de-de', + DeGr = 'de-gr', + DeIt = 'de-it', + DeLi = 'de-li', + DeLu = 'de-lu', + Dje = 'dje', + DjeNe = 'dje-ne', + Doi = 'doi', + DoiIn = 'doi-in', + Dsb = 'dsb', + DsbDe = 'dsb-de', + Dua = 'dua', + DuaCm = 'dua-cm', + Dyo = 'dyo', + DyoSn = 'dyo-sn', + Dz = 'dz', + DzBt = 'dz-bt', + Ebu = 'ebu', + EbuKe = 'ebu-ke', + Ee = 'ee', + EeGh = 'ee-gh', + EeTg = 'ee-tg', + El = 'el', + ElCy = 'el-cy', + ElGr = 'el-gr', + En = 'en', + En001 = 'en-001', + En150 = 'en-150', + EnAe = 'en-ae', + EnAg = 'en-ag', + EnAi = 'en-ai', + EnAs = 'en-as', + EnAt = 'en-at', + EnAu = 'en-au', + EnBb = 'en-bb', + EnBe = 'en-be', + EnBi = 'en-bi', + EnBm = 'en-bm', + EnBs = 'en-bs', + EnBw = 'en-bw', + EnBz = 'en-bz', + EnCa = 'en-ca', + EnCc = 'en-cc', + EnCh = 'en-ch', + EnCk = 'en-ck', + EnCm = 'en-cm', + EnCn = 'en-cn', + EnCx = 'en-cx', + EnCy = 'en-cy', + EnDe = 'en-de', + EnDg = 'en-dg', + EnDk = 'en-dk', + EnDm = 'en-dm', + EnEe = 'en-ee', + EnEr = 'en-er', + EnFr = 'en-fr', + EnFi = 'en-fi', + EnFj = 'en-fj', + EnFk = 'en-fk', + EnFm = 'en-fm', + EnGb = 'en-gb', + EnGd = 'en-gd', + EnGg = 'en-gg', + EnGh = 'en-gh', + EnGi = 'en-gi', + EnGm = 'en-gm', + EnGu = 'en-gu', + EnGy = 'en-gy', + EnHk = 'en-hk', + EnIe = 'en-ie', + EnIl = 'en-il', + EnIm = 'en-im', + EnIn = 'en-in', + EnIo = 'en-io', + EnJe = 'en-je', + EnJm = 'en-jm', + EnKe = 'en-ke', + EnKi = 'en-ki', + EnKn = 'en-kn', + EnKy = 'en-ky', + EnLc = 'en-lc', + EnLr = 'en-lr', + EnLs = 'en-ls', + EnLu = 'en-lu', + EnMg = 'en-mg', + EnMh = 'en-mh', + EnMo = 'en-mo', + EnMp = 'en-mp', + EnMs = 'en-ms', + EnMt = 'en-mt', + EnMu = 'en-mu', + EnMw = 'en-mw', + EnMx = 'en-mx', + EnMy = 'en-my', + EnNa = 'en-na', + EnNf = 'en-nf', + EnNg = 'en-ng', + EnNl = 'en-nl', + EnNr = 'en-nr', + EnNu = 'en-nu', + EnNz = 'en-nz', + EnPg = 'en-pg', + EnPh = 'en-ph', + EnPk = 'en-pk', + EnPn = 'en-pn', + EnPr = 'en-pr', + EnPw = 'en-pw', + EnRw = 'en-rw', + EnSb = 'en-sb', + EnSc = 'en-sc', + EnSd = 'en-sd', + EnSe = 'en-se', + EnSg = 'en-sg', + EnSh = 'en-sh', + EnSi = 'en-si', + EnSl = 'en-sl', + EnSs = 'en-ss', + EnSx = 'en-sx', + EnSz = 'en-sz', + EnTc = 'en-tc', + EnTk = 'en-tk', + EnTo = 'en-to', + EnTt = 'en-tt', + EnTv = 'en-tv', + EnTz = 'en-tz', + EnUg = 'en-ug', + EnUm = 'en-um', + EnUs = 'en-us', + EnVc = 'en-vc', + EnVg = 'en-vg', + EnVi = 'en-vi', + EnVu = 'en-vu', + EnWs = 'en-ws', + EnZa = 'en-za', + EnZm = 'en-zm', + EnZw = 'en-zw', + Eo = 'eo', + Eo001 = 'eo-001', + Es = 'es', + Es419 = 'es-419', + EsAr = 'es-ar', + EsBo = 'es-bo', + EsBr = 'es-br', + EsBz = 'es-bz', + EsCl = 'es-cl', + EsCo = 'es-co', + EsCr = 'es-cr', + EsCu = 'es-cu', + EsDo = 'es-do', + EsEa = 'es-ea', + EsEc = 'es-ec', + EsEs = 'es-es', + EsGq = 'es-gq', + EsGt = 'es-gt', + EsHn = 'es-hn', + EsIc = 'es-ic', + EsMx = 'es-mx', + EsNi = 'es-ni', + EsPa = 'es-pa', + EsPe = 'es-pe', + EsPh = 'es-ph', + EsPr = 'es-pr', + EsPy = 'es-py', + EsSv = 'es-sv', + EsUs = 'es-us', + EsUy = 'es-uy', + EsVe = 'es-ve', + Et = 'et', + EtEe = 'et-ee', + Eu = 'eu', + EuEs = 'eu-es', + Ewo = 'ewo', + EwoCm = 'ewo-cm', + Fa = 'fa', + FaAf = 'fa-af', + FaIr = 'fa-ir', + Ff = 'ff', + FfBf = 'ff-bf', + FfCm = 'ff-cm', + FfGh = 'ff-gh', + FfGm = 'ff-gm', + FfGn = 'ff-gn', + FfGw = 'ff-gw', + FfLr = 'ff-lr', + FfMr = 'ff-mr', + FfNe = 'ff-ne', + FfNg = 'ff-ng', + FfSl = 'ff-sl', + FfSn = 'ff-sn', + Fi = 'fi', + FiFi = 'fi-fi', + Fil = 'fil', + FilPh = 'fil-ph', + Fo = 'fo', + FoDk = 'fo-dk', + FoFo = 'fo-fo', + Fr = 'fr', + FrBe = 'fr-be', + FrBf = 'fr-bf', + FrBi = 'fr-bi', + FrBj = 'fr-bj', + FrBl = 'fr-bl', + FrCa = 'fr-ca', + FrCd = 'fr-cd', + FrCf = 'fr-cf', + FrCg = 'fr-cg', + FrCh = 'fr-ch', + FrCi = 'fr-ci', + FrCm = 'fr-cm', + FrDj = 'fr-dj', + FrDz = 'fr-dz', + FrFr = 'fr-fr', + FrGa = 'fr-ga', + FrGf = 'fr-gf', + FrGn = 'fr-gn', + FrGp = 'fr-gp', + FrGq = 'fr-gq', + FrHt = 'fr-ht', + FrKm = 'fr-km', + FrLu = 'fr-lu', + FrMa = 'fr-ma', + FrMc = 'fr-mc', + FrMf = 'fr-mf', + FrMg = 'fr-mg', + FrMl = 'fr-ml', + FrMq = 'fr-mq', + FrMr = 'fr-mr', + FrMu = 'fr-mu', + FrNc = 'fr-nc', + FrNe = 'fr-ne', + FrPf = 'fr-pf', + FrPm = 'fr-pm', + FrRe = 'fr-re', + FrRw = 'fr-rw', + FrSc = 'fr-sc', + FrSn = 'fr-sn', + FrSy = 'fr-sy', + FrTd = 'fr-td', + FrTg = 'fr-tg', + FrTn = 'fr-tn', + FrVu = 'fr-vu', + FrWf = 'fr-wf', + FrYt = 'fr-yt', + Fur = 'fur', + FurIt = 'fur-it', + Fy = 'fy', + FyNl = 'fy-nl', + Ga = 'ga', + GaGb = 'ga-gb', + GaIe = 'ga-ie', + Gd = 'gd', + GdGb = 'gd-gb', + Gl = 'gl', + GlEs = 'gl-es', + Gsw = 'gsw', + GswCh = 'gsw-ch', + GswFr = 'gsw-fr', + GswLi = 'gsw-li', + Gu = 'gu', + GuIn = 'gu-in', + Guz = 'guz', + GuzKe = 'guz-ke', + Gv = 'gv', + GvIm = 'gv-im', + Ha = 'ha', + HaGh = 'ha-gh', + HaNe = 'ha-ne', + HaNg = 'ha-ng', + Haw = 'haw', + HawUs = 'haw-us', + He = 'he', + Hi = 'hi', + HiIn = 'hi-in', + Hr = 'hr', + HrBa = 'hr-ba', + HrHr = 'hr-hr', + Hsb = 'hsb', + HsbDe = 'hsb-de', + Hu = 'hu', + HuHu = 'hu-hu', + Hy = 'hy', + HyAm = 'hy-am', + Ia = 'ia', + Ia001 = 'ia-001', + Id = 'id', + Ig = 'ig', + IgNg = 'ig-ng', + Ii = 'ii', + IiCn = 'ii-cn', + IdId = 'id-id', + Is = 'is', + IsIs = 'is-is', + It = 'it', + ItCh = 'it-ch', + ItIt = 'it-it', + ItSm = 'it-sm', + ItVa = 'it-va', + HeIl = 'he-il', + Ja = 'ja', + JaJp = 'ja-jp', + Jgo = 'jgo', + JgoCm = 'jgo-cm', + Yi = 'yi', + Yi001 = 'yi-001', + Jmc = 'jmc', + JmcTz = 'jmc-tz', + Jv = 'jv', + JvId = 'jv-id', + Ka = 'ka', + KaGe = 'ka-ge', + Kab = 'kab', + KabDz = 'kab-dz', + Kam = 'kam', + KamKe = 'kam-ke', + Kde = 'kde', + KdeTz = 'kde-tz', + Kea = 'kea', + KeaCv = 'kea-cv', + Khq = 'khq', + KhqMl = 'khq-ml', + Ki = 'ki', + KiKe = 'ki-ke', + Kk = 'kk', + KkKz = 'kk-kz', + Kkj = 'kkj', + KkjCm = 'kkj-cm', + Kl = 'kl', + KlGl = 'kl-gl', + Kln = 'kln', + KlnKe = 'kln-ke', + Km = 'km', + KmKh = 'km-kh', + Kn = 'kn', + KnIn = 'kn-in', + Ko = 'ko', + KoKp = 'ko-kp', + KoKr = 'ko-kr', + Kok = 'kok', + KokIn = 'kok-in', + Ks = 'ks', + KsIn = 'ks-in', + Ksb = 'ksb', + KsbTz = 'ksb-tz', + Ksf = 'ksf', + KsfCm = 'ksf-cm', + Ksh = 'ksh', + KshDe = 'ksh-de', + Kw = 'kw', + KwGb = 'kw-gb', + Ku = 'ku', + KuTr = 'ku-tr', + Ky = 'ky', + KyKg = 'ky-kg', + Lag = 'lag', + LagTz = 'lag-tz', + Lb = 'lb', + LbLu = 'lb-lu', + Lg = 'lg', + LgUg = 'lg-ug', + Lkt = 'lkt', + LktUs = 'lkt-us', + Ln = 'ln', + LnAo = 'ln-ao', + LnCd = 'ln-cd', + LnCf = 'ln-cf', + LnCg = 'ln-cg', + Lo = 'lo', + LoLa = 'lo-la', + Lrc = 'lrc', + LrcIq = 'lrc-iq', + LrcIr = 'lrc-ir', + Lt = 'lt', + LtLt = 'lt-lt', + Lu = 'lu', + LuCd = 'lu-cd', + Luo = 'luo', + LuoKe = 'luo-ke', + Luy = 'luy', + LuyKe = 'luy-ke', + Lv = 'lv', + LvLv = 'lv-lv', + Mai = 'mai', + MaiIn = 'mai-in', + Mas = 'mas', + MasKe = 'mas-ke', + MasTz = 'mas-tz', + Mer = 'mer', + MerKe = 'mer-ke', + Mfe = 'mfe', + MfeMu = 'mfe-mu', + Mg = 'mg', + MgMg = 'mg-mg', + Mgh = 'mgh', + MghMz = 'mgh-mz', + Mgo = 'mgo', + MgoCm = 'mgo-cm', + Mi = 'mi', + MiNz = 'mi-nz', + Mk = 'mk', + MkMk = 'mk-mk', + Ml = 'ml', + MlIn = 'ml-in', + Mn = 'mn', + MnMn = 'mn-mn', + Mni = 'mni', + MniIn = 'mni-in', + Mr = 'mr', + MrIn = 'mr-in', + Ms = 'ms', + MsBn = 'ms-bn', + MsId = 'ms-id', + MsMy = 'ms-my', + MsSg = 'ms-sg', + Mt = 'mt', + MtMt = 'mt-mt', + Mua = 'mua', + MuaCm = 'mua-cm', + My = 'my', + MyMm = 'my-mm', + Mzn = 'mzn', + MznIr = 'mzn-ir', + Naq = 'naq', + NaqNa = 'naq-na', + Nb = 'nb', + NbNo = 'nb-no', + NbSj = 'nb-sj', + Nd = 'nd', + NdZw = 'nd-zw', + Nds = 'nds', + NdsDe = 'nds-de', + NdsNl = 'nds-nl', + Ne = 'ne', + NeIn = 'ne-in', + NeNp = 'ne-np', + Nl = 'nl', + NlAw = 'nl-aw', + NlBe = 'nl-be', + NlCh = 'nl-ch', + NlBq = 'nl-bq', + NlCw = 'nl-cw', + NlLu = 'nl-lu', + NlNl = 'nl-nl', + NlSr = 'nl-sr', + NlSx = 'nl-sx', + Nmg = 'nmg', + NmgCm = 'nmg-cm', + Nn = 'nn', + NnNo = 'nn-no', + Nnh = 'nnh', + NnhCm = 'nnh-cm', + No = 'no', + NoNo = 'no-no', + Nus = 'nus', + NusSs = 'nus-ss', + Nyn = 'nyn', + NynUg = 'nyn-ug', + Om = 'om', + OmEt = 'om-et', + OmKe = 'om-ke', + Or = 'or', + OrIn = 'or-in', + Os = 'os', + OsGe = 'os-ge', + OsRu = 'os-ru', + Pa = 'pa', + PaIn = 'pa-in', + PaPk = 'pa-pk', + Pcm = 'pcm', + PcmNg = 'pcm-ng', + Pl = 'pl', + PlPl = 'pl-pl', + Prg = 'prg', + Prg001 = 'prg-001', + Ps = 'ps', + PsAf = 'ps-af', + PsPk = 'ps-pk', + Pt = 'pt', + PtAo = 'pt-ao', + PtBr = 'pt-br', + PtCh = 'pt-ch', + PtCv = 'pt-cv', + PtGq = 'pt-gq', + PtGw = 'pt-gw', + PtLu = 'pt-lu', + PtMo = 'pt-mo', + PtMz = 'pt-mz', + PtPt = 'pt-pt', + PtSt = 'pt-st', + PtTl = 'pt-tl', + Qu = 'qu', + QuBo = 'qu-bo', + QuEc = 'qu-ec', + QuPe = 'qu-pe', + Rm = 'rm', + RmCh = 'rm-ch', + Rn = 'rn', + RnBi = 'rn-bi', + Ro = 'ro', + RoMd = 'ro-md', + RoRo = 'ro-ro', + Rof = 'rof', + RofTz = 'rof-tz', + Ru = 'ru', + RuBy = 'ru-by', + RuKg = 'ru-kg', + RuKz = 'ru-kz', + RuMd = 'ru-md', + RuRu = 'ru-ru', + RuUa = 'ru-ua', + Rw = 'rw', + RwRw = 'rw-rw', + Rwk = 'rwk', + RwkTz = 'rwk-tz', + Sa = 'sa', + SaIn = 'sa-in', + Sah = 'sah', + SahRu = 'sah-ru', + Saq = 'saq', + SaqKe = 'saq-ke', + Sat = 'sat', + SatIn = 'sat-in', + Sbp = 'sbp', + SbpTz = 'sbp-tz', + Sd = 'sd', + SdIn = 'sd-in', + SdPk = 'sd-pk', + Se = 'se', + SeFi = 'se-fi', + SeNo = 'se-no', + SeSe = 'se-se', + Seh = 'seh', + SehMz = 'seh-mz', + Ses = 'ses', + SesMl = 'ses-ml', + Sg = 'sg', + SgCf = 'sg-cf', + Shi = 'shi', + ShiMa = 'shi-ma', + Si = 'si', + SiLk = 'si-lk', + Sk = 'sk', + SkSk = 'sk-sk', + Sl = 'sl', + SlSi = 'sl-si', + Smn = 'smn', + SmnFi = 'smn-fi', + Sn = 'sn', + SnZw = 'sn-zw', + So = 'so', + SoDj = 'so-dj', + SoEt = 'so-et', + SoKe = 'so-ke', + SoSo = 'so-so', + Sq = 'sq', + SqAl = 'sq-al', + SqMk = 'sq-mk', + SqXk = 'sq-xk', + Sr = 'sr', + SrBa = 'sr-ba', + SrCs = 'sr-cs', + SrMe = 'sr-me', + SrRs = 'sr-rs', + SrXk = 'sr-xk', + Su = 'su', + SuId = 'su-id', + Sv = 'sv', + SvAx = 'sv-ax', + SvFi = 'sv-fi', + SvSe = 'sv-se', + Sw = 'sw', + SwCd = 'sw-cd', + SwKe = 'sw-ke', + SwTz = 'sw-tz', + SwUg = 'sw-ug', + Sy = 'sy', + Ta = 'ta', + TaIn = 'ta-in', + TaLk = 'ta-lk', + TaMy = 'ta-my', + TaSg = 'ta-sg', + Te = 'te', + TeIn = 'te-in', + Teo = 'teo', + TeoKe = 'teo-ke', + TeoUg = 'teo-ug', + Tg = 'tg', + TgTj = 'tg-tj', + Th = 'th', + ThTh = 'th-th', + Ti = 'ti', + TiEr = 'ti-er', + TiEt = 'ti-et', + Tk = 'tk', + TkTm = 'tk-tm', + Tl = 'tl', + To = 'to', + ToTo = 'to-to', + Tr = 'tr', + TrCy = 'tr-cy', + TrTr = 'tr-tr', + Tt = 'tt', + TtRu = 'tt-ru', + Twq = 'twq', + TwqNe = 'twq-ne', + Tzm = 'tzm', + TzmMa = 'tzm-ma', + Ug = 'ug', + UgCn = 'ug-cn', + Uk = 'uk', + UkUa = 'uk-ua', + Ur = 'ur', + UrIn = 'ur-in', + UrPk = 'ur-pk', + Uz = 'uz', + UzAf = 'uz-af', + UzUz = 'uz-uz', + Vai = 'vai', + VaiLr = 'vai-lr', + Vi = 'vi', + ViVn = 'vi-vn', + Vo = 'vo', + Vo001 = 'vo-001', + Vun = 'vun', + VunTz = 'vun-tz', + Wae = 'wae', + WaeCh = 'wae-ch', + Wo = 'wo', + WoSn = 'wo-sn', + Xh = 'xh', + XhZa = 'xh-za', + Xog = 'xog', + XogUg = 'xog-ug', + Yav = 'yav', + YavCm = 'yav-cm', + Yo = 'yo', + YoBj = 'yo-bj', + YoNg = 'yo-ng', + Yue = 'yue', + YueCn = 'yue-cn', + YueHk = 'yue-hk', + Zgh = 'zgh', + ZghMa = 'zgh-ma', + Zh = 'zh', + ZhCn = 'zh-cn', + ZhHk = 'zh-hk', + ZhMo = 'zh-mo', + ZhSg = 'zh-sg', + ZhTw = 'zh-tw', + ZhHans = 'zh-hans', + ZhHant = 'zh-hant', + Zu = 'zu', + ZuZa = 'zu-za' +} + diff --git a/codegen/cms/blogs/blog_posts/models/BlogPost.ts b/codegen/cms/blogs/blog_posts/models/BlogPost.ts index ee219452b..8b86061f4 100644 --- a/codegen/cms/blogs/blog_posts/models/BlogPost.ts +++ b/codegen/cms/blogs/blog_posts/models/BlogPost.ts @@ -204,14 +204,14 @@ export class BlogPost { */ 'url': string; /** - * Rules for require member registration to access private content. - */ - 'publicAccessRules': Array; - /** * Boolean to allow overriding the AMP settings for the blog. */ 'enableGoogleAmpOutputOverride': boolean; /** + * Rules for require member registration to access private content. + */ + 'publicAccessRules': Array; + /** * The timestamp (ISO8601 format) when this Blog Post was deleted. */ 'archivedAt': number; @@ -236,7 +236,7 @@ export class BlogPost { */ 'currentState': BlogPostCurrentStateEnum; /** - * ID of the type of object this is. Should always . + * ID of the type of object this is. */ 'categoryId': number; /** @@ -553,18 +553,18 @@ export class BlogPost { "type": "string", "format": "" }, - { - "name": "publicAccessRules", - "baseName": "publicAccessRules", - "type": "Array", - "format": "" - }, { "name": "enableGoogleAmpOutputOverride", "baseName": "enableGoogleAmpOutputOverride", "type": "boolean", "format": "" }, + { + "name": "publicAccessRules", + "baseName": "publicAccessRules", + "type": "Array", + "format": "" + }, { "name": "archivedAt", "baseName": "archivedAt", @@ -781,7 +781,9 @@ export enum BlogPostLanguageEnum { EnDg = 'en-dg', EnDk = 'en-dk', EnDm = 'en-dm', + EnEe = 'en-ee', EnEr = 'en-er', + EnFr = 'en-fr', EnFi = 'en-fi', EnFj = 'en-fj', EnFk = 'en-fk', @@ -1392,7 +1394,10 @@ export enum BlogPostContentTypeCategoryEnum { _9 = '9', _10 = '10', _11 = '11', - _12 = '12' + _12 = '12', + _13 = '13', + _14 = '14', + _15 = '15' } export enum BlogPostAbStatusEnum { Master = 'master', diff --git a/codegen/cms/blogs/blog_posts/models/BreakpointStyles.ts b/codegen/cms/blogs/blog_posts/models/BreakpointStyles.ts new file mode 100644 index 000000000..8b06c04b2 --- /dev/null +++ b/codegen/cms/blogs/blog_posts/models/BreakpointStyles.ts @@ -0,0 +1,48 @@ +/** + * Posts + * Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class BreakpointStyles { + 'padding': any; + 'margin': any; + 'hidden': boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "padding", + "baseName": "padding", + "type": "any", + "format": "" + }, + { + "name": "margin", + "baseName": "margin", + "type": "any", + "format": "" + }, + { + "name": "hidden", + "baseName": "hidden", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BreakpointStyles.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/blogs/blog_posts/models/ContentLanguageVariation.ts b/codegen/cms/blogs/blog_posts/models/ContentLanguageVariation.ts index 738950a67..1890697cc 100644 --- a/codegen/cms/blogs/blog_posts/models/ContentLanguageVariation.ts +++ b/codegen/cms/blogs/blog_posts/models/ContentLanguageVariation.ts @@ -24,6 +24,7 @@ export class ContentLanguageVariation { 'campaign': string; 'id': number; 'state': string; + 'campaignName': string; 'updated': Date; 'slug': string; @@ -102,6 +103,12 @@ export class ContentLanguageVariation { "type": "string", "format": "" }, + { + "name": "campaignName", + "baseName": "campaignName", + "type": "string", + "format": "" + }, { "name": "updated", "baseName": "updated", diff --git a/codegen/cms/blogs/blog_posts/models/ObjectSerializer.ts b/codegen/cms/blogs/blog_posts/models/ObjectSerializer.ts index 8c1ff9e43..1e89573df 100644 --- a/codegen/cms/blogs/blog_posts/models/ObjectSerializer.ts +++ b/codegen/cms/blogs/blog_posts/models/ObjectSerializer.ts @@ -8,6 +8,7 @@ export * from '../models/BatchResponseBlogPost'; export * from '../models/BatchResponseBlogPostWithErrors'; export * from '../models/BlogPost'; export * from '../models/BlogPostLanguageCloneRequestVNext'; +export * from '../models/BreakpointStyles'; export * from '../models/CollectionResponseWithTotalBlogPostForwardPaging'; export * from '../models/CollectionResponseWithTotalVersionBlogPost'; export * from '../models/ColorStop'; @@ -34,7 +35,7 @@ export * from '../models/VersionBlogPost'; export * from '../models/VersionUser'; import { Angle } from '../models/Angle'; -import { AttachToLangPrimaryRequestVNext } from '../models/AttachToLangPrimaryRequestVNext'; +import { AttachToLangPrimaryRequestVNext } from '../models/AttachToLangPrimaryRequestVNext'; import { BackgroundImage } from '../models/BackgroundImage'; import { BatchInputBlogPost } from '../models/BatchInputBlogPost'; import { BatchInputJsonNode } from '../models/BatchInputJsonNode'; @@ -43,6 +44,7 @@ import { BatchResponseBlogPost } from '../models/BatchResponseBlogPost'; import { BatchResponseBlogPostWithErrors } from '../models/BatchResponseBlogPostWithErrors'; import { BlogPost } from '../models/BlogPost'; import { BlogPostLanguageCloneRequestVNext } from '../models/BlogPostLanguageCloneRequestVNext'; +import { BreakpointStyles } from '../models/BreakpointStyles'; import { CollectionResponseWithTotalBlogPostForwardPaging } from '../models/CollectionResponseWithTotalBlogPostForwardPaging'; import { CollectionResponseWithTotalVersionBlogPost } from '../models/CollectionResponseWithTotalVersionBlogPost'; import { ColorStop } from '../models/ColorStop'; @@ -81,6 +83,7 @@ let primitives = [ ]; let enumsMap: Set = new Set([ + "AttachToLangPrimaryRequestVNextLanguageEnum", "BatchResponseBlogPostStatusEnum", "BatchResponseBlogPostWithErrorsStatusEnum", "BlogPostLanguageEnum", @@ -100,6 +103,7 @@ let typeMap: {[index: string]: any} = { "BatchResponseBlogPostWithErrors": BatchResponseBlogPostWithErrors, "BlogPost": BlogPost, "BlogPostLanguageCloneRequestVNext": BlogPostLanguageCloneRequestVNext, + "BreakpointStyles": BreakpointStyles, "CollectionResponseWithTotalBlogPostForwardPaging": CollectionResponseWithTotalBlogPostForwardPaging, "CollectionResponseWithTotalVersionBlogPost": CollectionResponseWithTotalVersionBlogPost, "ColorStop": ColorStop, diff --git a/codegen/cms/blogs/blog_posts/models/Styles.ts b/codegen/cms/blogs/blog_posts/models/Styles.ts index f601a344f..6991f9892 100644 --- a/codegen/cms/blogs/blog_posts/models/Styles.ts +++ b/codegen/cms/blogs/blog_posts/models/Styles.ts @@ -11,6 +11,7 @@ */ import { BackgroundImage } from '../models/BackgroundImage'; +import { BreakpointStyles } from '../models/BreakpointStyles'; import { Gradient } from '../models/Gradient'; import { RGBAColor } from '../models/RGBAColor'; @@ -19,6 +20,7 @@ export class Styles { 'flexboxPositioning': string; 'backgroundImage': BackgroundImage; 'forceFullWidthSection': boolean; + 'breakpointStyles'?: { [key: string]: BreakpointStyles; }; 'verticalAlignment': string; 'maxWidthSectionCentering': number; 'backgroundGradient': Gradient; @@ -50,6 +52,12 @@ export class Styles { "type": "boolean", "format": "" }, + { + "name": "breakpointStyles", + "baseName": "breakpointStyles", + "type": "{ [key: string]: BreakpointStyles; }", + "format": "" + }, { "name": "verticalAlignment", "baseName": "verticalAlignment", diff --git a/codegen/cms/blogs/blog_posts/models/all.ts b/codegen/cms/blogs/blog_posts/models/all.ts index eaca5bc3e..43d27a00b 100644 --- a/codegen/cms/blogs/blog_posts/models/all.ts +++ b/codegen/cms/blogs/blog_posts/models/all.ts @@ -8,6 +8,7 @@ export * from '../models/BatchResponseBlogPost' export * from '../models/BatchResponseBlogPostWithErrors' export * from '../models/BlogPost' export * from '../models/BlogPostLanguageCloneRequestVNext' +export * from '../models/BreakpointStyles' export * from '../models/CollectionResponseWithTotalBlogPostForwardPaging' export * from '../models/CollectionResponseWithTotalVersionBlogPost' export * from '../models/ColorStop' diff --git a/codegen/cms/blogs/blog_posts/types/ObjectParamAPI.ts b/codegen/cms/blogs/blog_posts/types/ObjectParamAPI.ts index 1ec085f2a..fd38dfee5 100644 --- a/codegen/cms/blogs/blog_posts/types/ObjectParamAPI.ts +++ b/codegen/cms/blogs/blog_posts/types/ObjectParamAPI.ts @@ -731,7 +731,7 @@ export class ObjectBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param param the request object */ @@ -740,7 +740,7 @@ export class ObjectBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param param the request object */ diff --git a/codegen/cms/blogs/blog_posts/types/ObservableAPI.ts b/codegen/cms/blogs/blog_posts/types/ObservableAPI.ts index dbc7234fe..4826b7100 100644 --- a/codegen/cms/blogs/blog_posts/types/ObservableAPI.ts +++ b/codegen/cms/blogs/blog_posts/types/ObservableAPI.ts @@ -703,7 +703,7 @@ export class ObservableBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param setNewLanguagePrimaryRequestVNext The JSON representation of the SetNewLanguagePrimaryRequest object. */ @@ -727,7 +727,7 @@ export class ObservableBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param setNewLanguagePrimaryRequestVNext The JSON representation of the SetNewLanguagePrimaryRequest object. */ diff --git a/codegen/cms/blogs/blog_posts/types/PromiseAPI.ts b/codegen/cms/blogs/blog_posts/types/PromiseAPI.ts index 96668acb2..e56b197ce 100644 --- a/codegen/cms/blogs/blog_posts/types/PromiseAPI.ts +++ b/codegen/cms/blogs/blog_posts/types/PromiseAPI.ts @@ -452,7 +452,7 @@ export class PromiseBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param setNewLanguagePrimaryRequestVNext The JSON representation of the SetNewLanguagePrimaryRequest object. */ @@ -462,7 +462,7 @@ export class PromiseBlogPostsApi { } /** - * Set a Blog Post as the primary language of a multi-language group. + * Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body) * Set a new primary language * @param setNewLanguagePrimaryRequestVNext The JSON representation of the SetNewLanguagePrimaryRequest object. */ From c23ff4ef33b8c2c3d6016f978076911d088eac09 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Sep 2024 14:54:33 +0300 Subject: [PATCH 02/46] Codegen: CMS HubDB. --- codegen/cms/hubdb/apis/RowsApi.ts | 113 +++++-- codegen/cms/hubdb/apis/RowsBatchApi.ts | 39 +-- codegen/cms/hubdb/apis/TablesApi.ts | 93 ++++-- ...atchInputHubDbTableRowBatchCloneRequest.ts | 35 +++ ...hInputHubDbTableRowV3BatchUpdateRequest.ts | 2 +- .../BatchInputHubDbTableRowV3Request.ts | 2 +- codegen/cms/hubdb/models/BatchInputString.ts | 2 +- .../models/BatchResponseHubDbTableRowV3.ts | 2 +- .../BatchResponseHubDbTableRowV3WithErrors.ts | 2 +- codegen/cms/hubdb/models/BoundedNextPage.ts | 41 +++ codegen/cms/hubdb/models/BoundedPaging.ts | 35 +++ ...seWithTotalHubDbTableRowV3ForwardPaging.ts | 56 ---- ...ponseWithTotalHubDbTableV3ForwardPaging.ts | 2 +- codegen/cms/hubdb/models/Column.ts | 50 ++- codegen/cms/hubdb/models/ColumnRequest.ts | 7 +- codegen/cms/hubdb/models/ErrorDetail.ts | 2 +- codegen/cms/hubdb/models/ForeignId.ts | 2 +- codegen/cms/hubdb/models/ForwardPaging.ts | 2 +- .../hubdb/models/HubDbTableCloneRequest.ts | 9 +- .../models/HubDbTableRowBatchCloneRequest.ts | 41 +++ codegen/cms/hubdb/models/HubDbTableRowV3.ts | 2 +- .../HubDbTableRowV3BatchUpdateRequest.ts | 2 +- .../hubdb/models/HubDbTableRowV3Request.ts | 4 +- codegen/cms/hubdb/models/HubDbTableV3.ts | 7 +- .../cms/hubdb/models/HubDbTableV3Request.ts | 4 +- codegen/cms/hubdb/models/ImportResult.ts | 5 +- codegen/cms/hubdb/models/ModelError.ts | 2 +- codegen/cms/hubdb/models/NextPage.ts | 2 +- codegen/cms/hubdb/models/ObjectSerializer.ts | 35 ++- codegen/cms/hubdb/models/Option.ts | 55 +++- codegen/cms/hubdb/models/Paging.ts | 43 +++ codegen/cms/hubdb/models/PreviousPage.ts | 41 +++ ...lectionResponseWithTotalHubDbTableRowV3.ts | 62 ++++ codegen/cms/hubdb/models/SimpleUser.ts | 2 +- codegen/cms/hubdb/models/StandardError.ts | 2 +- ...lectionResponseWithTotalHubDbTableRowV3.ts | 62 ++++ ...ionResponseWithTotalBaseHubDbTableRowV3.ts | 63 ++++ codegen/cms/hubdb/models/all.ts | 10 +- codegen/cms/hubdb/types/ObjectParamAPI.ts | 277 +++++++++++------ codegen/cms/hubdb/types/ObservableAPI.ts | 291 ++++++++++-------- codegen/cms/hubdb/types/PromiseAPI.ts | 291 ++++++++++-------- 41 files changed, 1251 insertions(+), 548 deletions(-) create mode 100644 codegen/cms/hubdb/models/BatchInputHubDbTableRowBatchCloneRequest.ts create mode 100644 codegen/cms/hubdb/models/BoundedNextPage.ts create mode 100644 codegen/cms/hubdb/models/BoundedPaging.ts delete mode 100644 codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging.ts create mode 100644 codegen/cms/hubdb/models/HubDbTableRowBatchCloneRequest.ts create mode 100644 codegen/cms/hubdb/models/Paging.ts create mode 100644 codegen/cms/hubdb/models/PreviousPage.ts create mode 100644 codegen/cms/hubdb/models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3.ts create mode 100644 codegen/cms/hubdb/models/StreamingCollectionResponseWithTotalHubDbTableRowV3.ts create mode 100644 codegen/cms/hubdb/models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3.ts diff --git a/codegen/cms/hubdb/apis/RowsApi.ts b/codegen/cms/hubdb/apis/RowsApi.ts index 3548f3d84..5c371c7f7 100644 --- a/codegen/cms/hubdb/apis/RowsApi.ts +++ b/codegen/cms/hubdb/apis/RowsApi.ts @@ -8,9 +8,9 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { CollectionResponseWithTotalHubDbTableRowV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; +import { UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 } from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; /** * no description @@ -18,12 +18,13 @@ import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; export class RowsApiRequestFactory extends BaseAPIRequestFactory { /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param name */ - public async cloneDraftTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { + public async cloneDraftTableRow(tableIdOrName: string, rowId: string, name?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -38,6 +39,7 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft/clone' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))) @@ -47,6 +49,11 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Query Params + if (name !== undefined) { + requestContext.setQueryParam("name", ObjectSerializer.serialize(name, "string", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -64,10 +71,10 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param tableIdOrName The ID or name of the target table. - * @param hubDbTableRowV3Request The row definition JSON, formatted as described above. + * @param hubDbTableRowV3Request */ public async createTableRow(tableIdOrName: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -120,12 +127,13 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public async getDraftTableRowById(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { + public async getDraftTableRowById(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -140,6 +148,7 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))) @@ -149,6 +158,11 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Query Params + if (archived !== undefined) { + requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -166,12 +180,13 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public async getTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { + public async getTableRow(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -186,6 +201,7 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))) @@ -195,6 +211,11 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Query Params + if (archived !== undefined) { + requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -212,15 +233,17 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. See the above description for more details. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. + * @param offset + * @param archived */ - public async getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise { + public async getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -233,6 +256,8 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { + + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))); @@ -261,6 +286,16 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("properties", ObjectSerializer.serialize(properties, "Array", "")); } + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); + } + + // Query Params + if (archived !== undefined) { + requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -278,7 +313,7 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row @@ -324,15 +359,17 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. + * @param offset + * @param archived */ - public async readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise { + public async readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -345,6 +382,8 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { + + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))); @@ -373,6 +412,16 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("properties", ObjectSerializer.serialize(properties, "Array", "")); } + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); + } + + // Query Params + if (archived !== undefined) { + requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -390,11 +439,11 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row + * @param hubDbTableRowV3Request */ public async replaceDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -454,11 +503,11 @@ export class RowsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row with necessary fields that needs to be updated. + * @param hubDbTableRowV3Request */ public async updateDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -672,13 +721,13 @@ export class RowsApiResponseProcessor { * @params response Response returned by the server for a request to getTableRows * @throws ApiException if the response code was not in [200, 299] */ - public async getTableRowsWithHttpInfo(response: ResponseContext): Promise> { + public async getTableRowsWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseWithTotalHubDbTableRowV3ForwardPaging = ObjectSerializer.deserialize( + const body: UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseWithTotalHubDbTableRowV3ForwardPaging", "" - ) as CollectionResponseWithTotalHubDbTableRowV3ForwardPaging; + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3", "" + ) as UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("0", response.httpStatusCode)) { @@ -691,10 +740,10 @@ export class RowsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseWithTotalHubDbTableRowV3ForwardPaging = ObjectSerializer.deserialize( + const body: UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseWithTotalHubDbTableRowV3ForwardPaging", "" - ) as CollectionResponseWithTotalHubDbTableRowV3ForwardPaging; + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3", "" + ) as UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } @@ -740,13 +789,13 @@ export class RowsApiResponseProcessor { * @params response Response returned by the server for a request to readDraftTableRows * @throws ApiException if the response code was not in [200, 299] */ - public async readDraftTableRowsWithHttpInfo(response: ResponseContext): Promise> { + public async readDraftTableRowsWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseWithTotalHubDbTableRowV3ForwardPaging = ObjectSerializer.deserialize( + const body: UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseWithTotalHubDbTableRowV3ForwardPaging", "" - ) as CollectionResponseWithTotalHubDbTableRowV3ForwardPaging; + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3", "" + ) as UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("0", response.httpStatusCode)) { @@ -759,10 +808,10 @@ export class RowsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseWithTotalHubDbTableRowV3ForwardPaging = ObjectSerializer.deserialize( + const body: UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseWithTotalHubDbTableRowV3ForwardPaging", "" - ) as CollectionResponseWithTotalHubDbTableRowV3ForwardPaging; + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3", "" + ) as UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } diff --git a/codegen/cms/hubdb/apis/RowsBatchApi.ts b/codegen/cms/hubdb/apis/RowsBatchApi.ts index 2d4df89fb..941368f1c 100644 --- a/codegen/cms/hubdb/apis/RowsBatchApi.ts +++ b/codegen/cms/hubdb/apis/RowsBatchApi.ts @@ -8,6 +8,7 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { BatchInputHubDbTableRowBatchCloneRequest } from '../models/BatchInputHubDbTableRowBatchCloneRequest'; import { BatchInputHubDbTableRowV3BatchUpdateRequest } from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; import { BatchInputHubDbTableRowV3Request } from '../models/BatchInputHubDbTableRowV3Request'; import { BatchInputString } from '../models/BatchInputString'; @@ -20,12 +21,12 @@ import { BatchResponseHubDbTableRowV3WithErrors } from '../models/BatchResponseH export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputString The JSON array of row ids + * @param batchInputHubDbTableRowBatchCloneRequest */ - public async cloneDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { + public async cloneDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -34,9 +35,9 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } - // verify required parameter 'batchInputString' is not null or undefined - if (batchInputString === null || batchInputString === undefined) { - throw new RequiredError("RowsBatchApi", "cloneDraftTableRows", "batchInputString"); + // verify required parameter 'batchInputHubDbTableRowBatchCloneRequest' is not null or undefined + if (batchInputHubDbTableRowBatchCloneRequest === null || batchInputHubDbTableRowBatchCloneRequest === undefined) { + throw new RequiredError("RowsBatchApi", "cloneDraftTableRows", "batchInputHubDbTableRowBatchCloneRequest"); } @@ -55,7 +56,7 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputString, "BatchInputString", ""), + ObjectSerializer.serialize(batchInputHubDbTableRowBatchCloneRequest, "BatchInputHubDbTableRowBatchCloneRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -76,10 +77,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3Request JSON array of row objects + * @param batchInputHubDbTableRowV3Request */ public async createDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3Request: BatchInputHubDbTableRowV3Request, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -132,10 +133,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public async purgeDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -188,10 +189,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public async readDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -244,10 +245,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param tableIdOrName The ID or name of the table to query. - * @param batchInputString The JSON array of row ids + * @param batchInputString */ public async readTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -300,10 +301,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public async replaceDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -356,10 +357,10 @@ export class RowsBatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public async updateDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/cms/hubdb/apis/TablesApi.ts b/codegen/cms/hubdb/apis/TablesApi.ts index d08b9ca0b..4f5228c7b 100644 --- a/codegen/cms/hubdb/apis/TablesApi.ts +++ b/codegen/cms/hubdb/apis/TablesApi.ts @@ -60,10 +60,10 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param tableIdOrName The ID or name of the table to clone. - * @param hubDbTableCloneRequest JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * @param hubDbTableCloneRequest */ public async cloneDraftTable(tableIdOrName: string, hubDbTableCloneRequest: HubDbTableCloneRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -118,7 +118,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { /** * Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account. * Create a new table - * @param hubDbTableV3Request The JSON schema for the table being created. + * @param hubDbTableV3Request */ public async createTable(hubDbTableV3Request: HubDbTableV3Request, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -164,7 +164,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -209,7 +209,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -265,9 +265,10 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public async getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise { + public async getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -280,6 +281,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { + // Path Params const localVarPath = '/cms/v3/hubdb/tables/draft'; @@ -332,6 +334,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("updatedBefore", ObjectSerializer.serialize(updatedBefore, "Date", "date-time")); } + // Query Params + if (contentType !== undefined) { + requestContext.setQueryParam("contentType", ObjectSerializer.serialize(contentType, "string", "")); + } + // Query Params if (archived !== undefined) { requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); @@ -354,7 +361,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @@ -365,9 +372,10 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public async getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise { + public async getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -380,6 +388,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { + // Path Params const localVarPath = '/cms/v3/hubdb/tables'; @@ -432,6 +441,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("updatedBefore", ObjectSerializer.serialize(updatedBefore, "Date", "date-time")); } + // Query Params + if (contentType !== undefined) { + requestContext.setQueryParam("contentType", ObjectSerializer.serialize(contentType, "string", "")); + } + // Query Params if (archived !== undefined) { requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); @@ -454,13 +468,14 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public async getDraftTableDetailsById(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { + public async getDraftTableDetailsById(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -471,6 +486,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/draft' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))); @@ -480,8 +496,8 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params - if (includeForeignIds !== undefined) { - requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + if (isGetLocalizedSchema !== undefined) { + requestContext.setQueryParam("isGetLocalizedSchema", ObjectSerializer.serialize(isGetLocalizedSchema, "boolean", "")); } // Query Params @@ -489,6 +505,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); } + // Query Params + if (includeForeignIds !== undefined) { + requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -506,13 +527,14 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return details for an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public async getTableDetails(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { + public async getTableDetails(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -523,6 +545,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))); @@ -532,8 +555,8 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params - if (includeForeignIds !== undefined) { - requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + if (isGetLocalizedSchema !== undefined) { + requestContext.setQueryParam("isGetLocalizedSchema", ObjectSerializer.serialize(isGetLocalizedSchema, "boolean", "")); } // Query Params @@ -541,6 +564,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); } + // Query Params + if (includeForeignIds !== undefined) { + requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -558,11 +586,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param tableIdOrName The ID of the destination table where data will be imported. - * @param config Configuration for the import in JSON format as described above. - * @param file The source CSV file to be imported. + * @param config + * @param file */ public async importDraftTable(tableIdOrName: string, config?: string, file?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -676,7 +704,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param tableIdOrName The ID or name of the table to reset. * @param includeForeignIds Set this to `true` to populate foreign ID values in the response. @@ -766,14 +794,15 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param tableIdOrName The ID or name of the table to update. - * @param hubDbTableV3Request The JSON schema for the table being updated. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param hubDbTableV3Request + * @param isGetLocalizedSchema * @param archived Specifies whether to return archived tables. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public async updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { + public async updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'tableIdOrName' is not null or undefined @@ -790,6 +819,7 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { + // Path Params const localVarPath = '/cms/v3/hubdb/tables/{tableIdOrName}/draft' .replace('{' + 'tableIdOrName' + '}', encodeURIComponent(String(tableIdOrName))); @@ -799,8 +829,8 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params - if (includeForeignIds !== undefined) { - requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + if (isGetLocalizedSchema !== undefined) { + requestContext.setQueryParam("isGetLocalizedSchema", ObjectSerializer.serialize(isGetLocalizedSchema, "boolean", "")); } // Query Params @@ -808,6 +838,11 @@ export class TablesApiRequestFactory extends BaseAPIRequestFactory { requestContext.setQueryParam("archived", ObjectSerializer.serialize(archived, "boolean", "")); } + // Query Params + if (includeForeignIds !== undefined) { + requestContext.setQueryParam("includeForeignIds", ObjectSerializer.serialize(includeForeignIds, "boolean", "")); + } + // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ diff --git a/codegen/cms/hubdb/models/BatchInputHubDbTableRowBatchCloneRequest.ts b/codegen/cms/hubdb/models/BatchInputHubDbTableRowBatchCloneRequest.ts new file mode 100644 index 000000000..7d6f0ca6d --- /dev/null +++ b/codegen/cms/hubdb/models/BatchInputHubDbTableRowBatchCloneRequest.ts @@ -0,0 +1,35 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HubDbTableRowBatchCloneRequest } from '../models/HubDbTableRowBatchCloneRequest'; + +export class BatchInputHubDbTableRowBatchCloneRequest { + 'inputs': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "inputs", + "baseName": "inputs", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchInputHubDbTableRowBatchCloneRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3BatchUpdateRequest.ts b/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3BatchUpdateRequest.ts index b2da4bbc1..e47e8ef10 100644 --- a/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3BatchUpdateRequest.ts +++ b/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3BatchUpdateRequest.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3Request.ts b/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3Request.ts index 943057cb2..a4a162257 100644 --- a/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3Request.ts +++ b/codegen/cms/hubdb/models/BatchInputHubDbTableRowV3Request.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/BatchInputString.ts b/codegen/cms/hubdb/models/BatchInputString.ts index 6f0ad0204..a0829b2d1 100644 --- a/codegen/cms/hubdb/models/BatchInputString.ts +++ b/codegen/cms/hubdb/models/BatchInputString.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3.ts b/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3.ts index f5a68e0eb..29c33ca92 100644 --- a/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3.ts +++ b/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3WithErrors.ts b/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3WithErrors.ts index a3f0d8665..2cd238b23 100644 --- a/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3WithErrors.ts +++ b/codegen/cms/hubdb/models/BatchResponseHubDbTableRowV3WithErrors.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/BoundedNextPage.ts b/codegen/cms/hubdb/models/BoundedNextPage.ts new file mode 100644 index 000000000..f575eceb8 --- /dev/null +++ b/codegen/cms/hubdb/models/BoundedNextPage.ts @@ -0,0 +1,41 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class BoundedNextPage { + 'offset': number; + 'link'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "offset", + "baseName": "offset", + "type": "number", + "format": "int32" + }, + { + "name": "link", + "baseName": "link", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BoundedNextPage.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/BoundedPaging.ts b/codegen/cms/hubdb/models/BoundedPaging.ts new file mode 100644 index 000000000..887f5aae6 --- /dev/null +++ b/codegen/cms/hubdb/models/BoundedPaging.ts @@ -0,0 +1,35 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { BoundedNextPage } from '../models/BoundedNextPage'; + +export class BoundedPaging { + 'next'?: BoundedNextPage; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "next", + "baseName": "next", + "type": "BoundedNextPage", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BoundedPaging.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging.ts b/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging.ts deleted file mode 100644 index 8f0c6881a..000000000 --- a/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ForwardPaging } from '../models/ForwardPaging'; -import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; - -export class CollectionResponseWithTotalHubDbTableRowV3ForwardPaging { - /** - * - */ - 'total': number; - 'paging'?: ForwardPaging; - /** - * - */ - 'results': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "total", - "baseName": "total", - "type": "number", - "format": "int32" - }, - { - "name": "paging", - "baseName": "paging", - "type": "ForwardPaging", - "format": "" - }, - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CollectionResponseWithTotalHubDbTableRowV3ForwardPaging.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableV3ForwardPaging.ts b/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableV3ForwardPaging.ts index 1dd936eaa..aa832599f 100644 --- a/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableV3ForwardPaging.ts +++ b/codegen/cms/hubdb/models/CollectionResponseWithTotalHubDbTableV3ForwardPaging.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/Column.ts b/codegen/cms/hubdb/models/Column.ts index 9b7e33315..c4ea29c6d 100644 --- a/codegen/cms/hubdb/models/Column.ts +++ b/codegen/cms/hubdb/models/Column.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,17 +12,21 @@ import { ForeignId } from '../models/ForeignId'; import { Option } from '../models/Option'; +import { SimpleUser } from '../models/SimpleUser'; export class Column { + 'createdByUserId'?: number; /** * Foreign table id referenced */ 'foreignTableId'?: number; + 'updatedBy'?: SimpleUser; 'description'?: string; /** * Label of the column */ 'label': string; + 'updatedByUserId'?: number; /** * Type of the column */ @@ -35,7 +39,9 @@ export class Column { * Foreign Ids */ 'foreignIds'?: Array; + 'createdAt'?: Date; 'deleted'?: boolean; + 'createdBy'?: SimpleUser; /** * Name of the column */ @@ -64,16 +70,29 @@ export class Column { * Foreign ids by name */ 'foreignIdsByName'?: { [key: string]: ForeignId; }; + 'updatedAt'?: Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdByUserId", + "baseName": "createdByUserId", + "type": "number", + "format": "int32" + }, { "name": "foreignTableId", "baseName": "foreignTableId", "type": "number", "format": "int64" }, + { + "name": "updatedBy", + "baseName": "updatedBy", + "type": "SimpleUser", + "format": "" + }, { "name": "description", "baseName": "description", @@ -86,6 +105,12 @@ export class Column { "type": "string", "format": "" }, + { + "name": "updatedByUserId", + "baseName": "updatedByUserId", + "type": "number", + "format": "int32" + }, { "name": "type", "baseName": "type", @@ -104,12 +129,24 @@ export class Column { "type": "Array", "format": "" }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, { "name": "deleted", "baseName": "deleted", "type": "boolean", "format": "" }, + { + "name": "createdBy", + "baseName": "createdBy", + "type": "SimpleUser", + "format": "" + }, { "name": "name", "baseName": "name", @@ -151,6 +188,12 @@ export class Column { "baseName": "foreignIdsByName", "type": "{ [key: string]: ForeignId; }", "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { @@ -179,6 +222,9 @@ export enum ColumnTypeEnum { ForeignId = 'FOREIGN_ID', Video = 'VIDEO', Cta = 'CTA', - File = 'FILE' + File = 'FILE', + Json = 'JSON', + Composite = 'COMPOSITE', + Code = 'CODE' } diff --git a/codegen/cms/hubdb/models/ColumnRequest.ts b/codegen/cms/hubdb/models/ColumnRequest.ts index ee379148b..9b49ac5be 100644 --- a/codegen/cms/hubdb/models/ColumnRequest.ts +++ b/codegen/cms/hubdb/models/ColumnRequest.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -114,6 +114,9 @@ export enum ColumnRequestTypeEnum { ForeignId = 'FOREIGN_ID', Video = 'VIDEO', Cta = 'CTA', - File = 'FILE' + File = 'FILE', + Json = 'JSON', + Composite = 'COMPOSITE', + Code = 'CODE' } diff --git a/codegen/cms/hubdb/models/ErrorDetail.ts b/codegen/cms/hubdb/models/ErrorDetail.ts index 025129140..587c9e808 100644 --- a/codegen/cms/hubdb/models/ErrorDetail.ts +++ b/codegen/cms/hubdb/models/ErrorDetail.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/ForeignId.ts b/codegen/cms/hubdb/models/ForeignId.ts index 62cd9e89d..f0fc600af 100644 --- a/codegen/cms/hubdb/models/ForeignId.ts +++ b/codegen/cms/hubdb/models/ForeignId.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/ForwardPaging.ts b/codegen/cms/hubdb/models/ForwardPaging.ts index 8d9eb0a3b..cbbd04fe7 100644 --- a/codegen/cms/hubdb/models/ForwardPaging.ts +++ b/codegen/cms/hubdb/models/ForwardPaging.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/HubDbTableCloneRequest.ts b/codegen/cms/hubdb/models/HubDbTableCloneRequest.ts index a0b62951e..988f2d2f3 100644 --- a/codegen/cms/hubdb/models/HubDbTableCloneRequest.ts +++ b/codegen/cms/hubdb/models/HubDbTableCloneRequest.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -16,6 +16,7 @@ export class HubDbTableCloneRequest { * The new name for the cloned table */ 'newName'?: string; + 'isHubspotDefined': boolean; /** * The new label for the cloned table */ @@ -34,6 +35,12 @@ export class HubDbTableCloneRequest { "type": "string", "format": "" }, + { + "name": "isHubspotDefined", + "baseName": "isHubspotDefined", + "type": "boolean", + "format": "" + }, { "name": "newLabel", "baseName": "newLabel", diff --git a/codegen/cms/hubdb/models/HubDbTableRowBatchCloneRequest.ts b/codegen/cms/hubdb/models/HubDbTableRowBatchCloneRequest.ts new file mode 100644 index 000000000..2bc1d3a13 --- /dev/null +++ b/codegen/cms/hubdb/models/HubDbTableRowBatchCloneRequest.ts @@ -0,0 +1,41 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class HubDbTableRowBatchCloneRequest { + 'name'?: string; + 'id': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return HubDbTableRowBatchCloneRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/HubDbTableRowV3.ts b/codegen/cms/hubdb/models/HubDbTableRowV3.ts index dc7b0fb33..82ffadc5f 100644 --- a/codegen/cms/hubdb/models/HubDbTableRowV3.ts +++ b/codegen/cms/hubdb/models/HubDbTableRowV3.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts b/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts index d6cf71fe6..e6a91ac41 100644 --- a/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts +++ b/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/HubDbTableRowV3Request.ts b/codegen/cms/hubdb/models/HubDbTableRowV3Request.ts index 0fe240dfc..e2e0b65e8 100644 --- a/codegen/cms/hubdb/models/HubDbTableRowV3Request.ts +++ b/codegen/cms/hubdb/models/HubDbTableRowV3Request.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -43,7 +43,7 @@ export class HubDbTableRowV3Request { "name": "childTableId", "baseName": "childTableId", "type": "number", - "format": "int32" + "format": "int64" }, { "name": "values", diff --git a/codegen/cms/hubdb/models/HubDbTableV3.ts b/codegen/cms/hubdb/models/HubDbTableV3.ts index 7739a9c31..537b88321 100644 --- a/codegen/cms/hubdb/models/HubDbTableV3.ts +++ b/codegen/cms/hubdb/models/HubDbTableV3.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,12 +13,9 @@ import { Column } from '../models/Column'; import { SimpleUser } from '../models/SimpleUser'; -/** -* Model for HubDB table -*/ export class HubDbTableV3 { /** - * Specifies the key value pairs of the metadata fields with the associated column ids + * Specifies the key value pairs of the [metadata fields](https://developers.hubspot.com/docs/cms/guides/dynamic-pages/hubdb#dynamic-pages) with the associated column IDs. */ 'dynamicMetaTags'?: { [key: string]: number; }; 'updatedBy'?: SimpleUser; diff --git a/codegen/cms/hubdb/models/HubDbTableV3Request.ts b/codegen/cms/hubdb/models/HubDbTableV3Request.ts index 6ae82edda..fc956c1c2 100644 --- a/codegen/cms/hubdb/models/HubDbTableV3Request.ts +++ b/codegen/cms/hubdb/models/HubDbTableV3Request.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -14,7 +14,7 @@ import { ColumnRequest } from '../models/ColumnRequest'; export class HubDbTableV3Request { /** - * Specifies the key value pairs of the metadata fields with the associated column ids + * Specifies the key value pairs of the [metadata fields](https://developers.hubspot.com/docs/cms/guides/dynamic-pages/hubdb#dynamic-pages) with the associated column IDs. */ 'dynamicMetaTags'?: { [key: string]: number; }; /** diff --git a/codegen/cms/hubdb/models/ImportResult.ts b/codegen/cms/hubdb/models/ImportResult.ts index ea1089d30..061ab3172 100644 --- a/codegen/cms/hubdb/models/ImportResult.ts +++ b/codegen/cms/hubdb/models/ImportResult.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* The result of import operation -*/ export class ImportResult { /** * Specifies whether row limit exceeded during import diff --git a/codegen/cms/hubdb/models/ModelError.ts b/codegen/cms/hubdb/models/ModelError.ts index 7537e0ce4..9b11ee53e 100644 --- a/codegen/cms/hubdb/models/ModelError.ts +++ b/codegen/cms/hubdb/models/ModelError.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/NextPage.ts b/codegen/cms/hubdb/models/NextPage.ts index 551f7e234..cdb19640d 100644 --- a/codegen/cms/hubdb/models/NextPage.ts +++ b/codegen/cms/hubdb/models/NextPage.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/ObjectSerializer.ts b/codegen/cms/hubdb/models/ObjectSerializer.ts index 70b9c1f85..6091461ba 100644 --- a/codegen/cms/hubdb/models/ObjectSerializer.ts +++ b/codegen/cms/hubdb/models/ObjectSerializer.ts @@ -1,9 +1,11 @@ +export * from '../models/BatchInputHubDbTableRowBatchCloneRequest'; export * from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; export * from '../models/BatchInputHubDbTableRowV3Request'; export * from '../models/BatchInputString'; export * from '../models/BatchResponseHubDbTableRowV3'; export * from '../models/BatchResponseHubDbTableRowV3WithErrors'; -export * from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; +export * from '../models/BoundedNextPage'; +export * from '../models/BoundedPaging'; export * from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging'; export * from '../models/Column'; export * from '../models/ColumnRequest'; @@ -11,6 +13,7 @@ export * from '../models/ErrorDetail'; export * from '../models/ForeignId'; export * from '../models/ForwardPaging'; export * from '../models/HubDbTableCloneRequest'; +export * from '../models/HubDbTableRowBatchCloneRequest'; export * from '../models/HubDbTableRowV3'; export * from '../models/HubDbTableRowV3BatchUpdateRequest'; export * from '../models/HubDbTableRowV3Request'; @@ -20,22 +23,30 @@ export * from '../models/ImportResult'; export * from '../models/ModelError'; export * from '../models/NextPage'; export * from '../models/Option'; +export * from '../models/Paging'; +export * from '../models/PreviousPage'; +export * from '../models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3'; export * from '../models/SimpleUser'; export * from '../models/StandardError'; +export * from '../models/StreamingCollectionResponseWithTotalHubDbTableRowV3'; +export * from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; +import { BatchInputHubDbTableRowBatchCloneRequest } from '../models/BatchInputHubDbTableRowBatchCloneRequest'; import { BatchInputHubDbTableRowV3BatchUpdateRequest } from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; import { BatchInputHubDbTableRowV3Request } from '../models/BatchInputHubDbTableRowV3Request'; import { BatchInputString } from '../models/BatchInputString'; import { BatchResponseHubDbTableRowV3 } from '../models/BatchResponseHubDbTableRowV3'; import { BatchResponseHubDbTableRowV3WithErrors } from '../models/BatchResponseHubDbTableRowV3WithErrors'; -import { CollectionResponseWithTotalHubDbTableRowV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; +import { BoundedNextPage } from '../models/BoundedNextPage'; +import { BoundedPaging } from '../models/BoundedPaging'; import { CollectionResponseWithTotalHubDbTableV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging'; -import { Column } from '../models/Column'; +import { Column } from '../models/Column'; import { ColumnRequest } from '../models/ColumnRequest'; import { ErrorDetail } from '../models/ErrorDetail'; import { ForeignId } from '../models/ForeignId'; import { ForwardPaging } from '../models/ForwardPaging'; import { HubDbTableCloneRequest } from '../models/HubDbTableCloneRequest'; +import { HubDbTableRowBatchCloneRequest } from '../models/HubDbTableRowBatchCloneRequest'; import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; import { HubDbTableRowV3BatchUpdateRequest } from '../models/HubDbTableRowV3BatchUpdateRequest'; import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; @@ -45,8 +56,13 @@ import { ImportResult } from '../models/ImportResult'; import { ModelError } from '../models/ModelError'; import { NextPage } from '../models/NextPage'; import { Option } from '../models/Option'; +import { Paging } from '../models/Paging'; +import { PreviousPage } from '../models/PreviousPage'; +import { RandomAccessCollectionResponseWithTotalHubDbTableRowV3 } from '../models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3'; import { SimpleUser } from '../models/SimpleUser'; import { StandardError } from '../models/StandardError'; +import { StreamingCollectionResponseWithTotalHubDbTableRowV3 } from '../models/StreamingCollectionResponseWithTotalHubDbTableRowV3'; +import { UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 } from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -65,15 +81,20 @@ let enumsMap: Set = new Set([ "BatchResponseHubDbTableRowV3WithErrorsStatusEnum", "ColumnTypeEnum", "ColumnRequestTypeEnum", + "RandomAccessCollectionResponseWithTotalHubDbTableRowV3TypeEnum", + "StreamingCollectionResponseWithTotalHubDbTableRowV3TypeEnum", + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3TypeEnum", ]); let typeMap: {[index: string]: any} = { + "BatchInputHubDbTableRowBatchCloneRequest": BatchInputHubDbTableRowBatchCloneRequest, "BatchInputHubDbTableRowV3BatchUpdateRequest": BatchInputHubDbTableRowV3BatchUpdateRequest, "BatchInputHubDbTableRowV3Request": BatchInputHubDbTableRowV3Request, "BatchInputString": BatchInputString, "BatchResponseHubDbTableRowV3": BatchResponseHubDbTableRowV3, "BatchResponseHubDbTableRowV3WithErrors": BatchResponseHubDbTableRowV3WithErrors, - "CollectionResponseWithTotalHubDbTableRowV3ForwardPaging": CollectionResponseWithTotalHubDbTableRowV3ForwardPaging, + "BoundedNextPage": BoundedNextPage, + "BoundedPaging": BoundedPaging, "CollectionResponseWithTotalHubDbTableV3ForwardPaging": CollectionResponseWithTotalHubDbTableV3ForwardPaging, "Column": Column, "ColumnRequest": ColumnRequest, @@ -81,6 +102,7 @@ let typeMap: {[index: string]: any} = { "ForeignId": ForeignId, "ForwardPaging": ForwardPaging, "HubDbTableCloneRequest": HubDbTableCloneRequest, + "HubDbTableRowBatchCloneRequest": HubDbTableRowBatchCloneRequest, "HubDbTableRowV3": HubDbTableRowV3, "HubDbTableRowV3BatchUpdateRequest": HubDbTableRowV3BatchUpdateRequest, "HubDbTableRowV3Request": HubDbTableRowV3Request, @@ -90,8 +112,13 @@ let typeMap: {[index: string]: any} = { "ModelError": ModelError, "NextPage": NextPage, "Option": Option, + "Paging": Paging, + "PreviousPage": PreviousPage, + "RandomAccessCollectionResponseWithTotalHubDbTableRowV3": RandomAccessCollectionResponseWithTotalHubDbTableRowV3, "SimpleUser": SimpleUser, "StandardError": StandardError, + "StreamingCollectionResponseWithTotalHubDbTableRowV3": StreamingCollectionResponseWithTotalHubDbTableRowV3, + "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3": UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3, } type MimeTypeDescriptor = { diff --git a/codegen/cms/hubdb/models/Option.ts b/codegen/cms/hubdb/models/Option.ts index bf8a09106..1e41bd67c 100644 --- a/codegen/cms/hubdb/models/Option.ts +++ b/codegen/cms/hubdb/models/Option.ts @@ -1,38 +1,69 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ +import { SimpleUser } from '../models/SimpleUser'; export class Option { + 'createdByUserId'?: number; + 'createdAt': Date; + 'updatedBy'?: SimpleUser; + 'createdBy'?: SimpleUser; /** - * + * */ 'name': string; /** - * + * */ 'id': string; 'label'?: string; + 'updatedByUserId'?: number; /** - * + * */ 'type': string; /** - * + * */ 'order': number; + 'updatedAt': Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdByUserId", + "baseName": "createdByUserId", + "type": "number", + "format": "int32" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "updatedBy", + "baseName": "updatedBy", + "type": "SimpleUser", + "format": "" + }, + { + "name": "createdBy", + "baseName": "createdBy", + "type": "SimpleUser", + "format": "" + }, { "name": "name", "baseName": "name", @@ -51,6 +82,12 @@ export class Option { "type": "string", "format": "" }, + { + "name": "updatedByUserId", + "baseName": "updatedByUserId", + "type": "number", + "format": "int32" + }, { "name": "type", "baseName": "type", @@ -62,6 +99,12 @@ export class Option { "baseName": "order", "type": "number", "format": "int32" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/hubdb/models/Paging.ts b/codegen/cms/hubdb/models/Paging.ts new file mode 100644 index 000000000..8ef6c11d2 --- /dev/null +++ b/codegen/cms/hubdb/models/Paging.ts @@ -0,0 +1,43 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { NextPage } from '../models/NextPage'; +import { PreviousPage } from '../models/PreviousPage'; + +export class Paging { + 'next'?: NextPage; + 'prev'?: PreviousPage; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "next", + "baseName": "next", + "type": "NextPage", + "format": "" + }, + { + "name": "prev", + "baseName": "prev", + "type": "PreviousPage", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Paging.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/PreviousPage.ts b/codegen/cms/hubdb/models/PreviousPage.ts new file mode 100644 index 000000000..fdfc2bba3 --- /dev/null +++ b/codegen/cms/hubdb/models/PreviousPage.ts @@ -0,0 +1,41 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class PreviousPage { + 'before': string; + 'link'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "before", + "baseName": "before", + "type": "string", + "format": "" + }, + { + "name": "link", + "baseName": "link", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PreviousPage.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/hubdb/models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3.ts b/codegen/cms/hubdb/models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3.ts new file mode 100644 index 000000000..9c239fea8 --- /dev/null +++ b/codegen/cms/hubdb/models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3.ts @@ -0,0 +1,62 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { BoundedPaging } from '../models/BoundedPaging'; +import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; + +export class RandomAccessCollectionResponseWithTotalHubDbTableRowV3 { + 'total': number; + 'paging'?: BoundedPaging; + 'type': RandomAccessCollectionResponseWithTotalHubDbTableRowV3TypeEnum; + 'results': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int32" + }, + { + "name": "paging", + "baseName": "paging", + "type": "BoundedPaging", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "RandomAccessCollectionResponseWithTotalHubDbTableRowV3TypeEnum", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RandomAccessCollectionResponseWithTotalHubDbTableRowV3.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum RandomAccessCollectionResponseWithTotalHubDbTableRowV3TypeEnum { + RandomAccess = 'RANDOM_ACCESS' +} + diff --git a/codegen/cms/hubdb/models/SimpleUser.ts b/codegen/cms/hubdb/models/SimpleUser.ts index 180ddef45..3aa6a95f7 100644 --- a/codegen/cms/hubdb/models/SimpleUser.ts +++ b/codegen/cms/hubdb/models/SimpleUser.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/StandardError.ts b/codegen/cms/hubdb/models/StandardError.ts index a9fdcd673..97510002e 100644 --- a/codegen/cms/hubdb/models/StandardError.ts +++ b/codegen/cms/hubdb/models/StandardError.ts @@ -1,6 +1,6 @@ /** * Hubdb - * HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/hubdb/models/StreamingCollectionResponseWithTotalHubDbTableRowV3.ts b/codegen/cms/hubdb/models/StreamingCollectionResponseWithTotalHubDbTableRowV3.ts new file mode 100644 index 000000000..0b15abb34 --- /dev/null +++ b/codegen/cms/hubdb/models/StreamingCollectionResponseWithTotalHubDbTableRowV3.ts @@ -0,0 +1,62 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; +import { Paging } from '../models/Paging'; + +export class StreamingCollectionResponseWithTotalHubDbTableRowV3 { + 'total': number; + 'paging'?: Paging; + 'type': StreamingCollectionResponseWithTotalHubDbTableRowV3TypeEnum; + 'results': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int32" + }, + { + "name": "paging", + "baseName": "paging", + "type": "Paging", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "StreamingCollectionResponseWithTotalHubDbTableRowV3TypeEnum", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StreamingCollectionResponseWithTotalHubDbTableRowV3.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum StreamingCollectionResponseWithTotalHubDbTableRowV3TypeEnum { + Streaming = 'STREAMING' +} + diff --git a/codegen/cms/hubdb/models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3.ts b/codegen/cms/hubdb/models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3.ts new file mode 100644 index 000000000..6c503269e --- /dev/null +++ b/codegen/cms/hubdb/models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3.ts @@ -0,0 +1,63 @@ +/** + * Hubdb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; +import { Paging } from '../models/Paging'; + +export class UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 { + 'total': number; + 'paging'?: Paging; + 'type': UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3TypeEnum; + 'results': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int32" + }, + { + "name": "paging", + "baseName": "paging", + "type": "Paging", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3TypeEnum", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3TypeEnum { + RandomAccess = 'RANDOM_ACCESS', + Streaming = 'STREAMING' +} + diff --git a/codegen/cms/hubdb/models/all.ts b/codegen/cms/hubdb/models/all.ts index 9222081ac..ad2f3228c 100644 --- a/codegen/cms/hubdb/models/all.ts +++ b/codegen/cms/hubdb/models/all.ts @@ -1,9 +1,11 @@ +export * from '../models/BatchInputHubDbTableRowBatchCloneRequest' export * from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest' export * from '../models/BatchInputHubDbTableRowV3Request' export * from '../models/BatchInputString' export * from '../models/BatchResponseHubDbTableRowV3' export * from '../models/BatchResponseHubDbTableRowV3WithErrors' -export * from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging' +export * from '../models/BoundedNextPage' +export * from '../models/BoundedPaging' export * from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging' export * from '../models/Column' export * from '../models/ColumnRequest' @@ -11,6 +13,7 @@ export * from '../models/ErrorDetail' export * from '../models/ForeignId' export * from '../models/ForwardPaging' export * from '../models/HubDbTableCloneRequest' +export * from '../models/HubDbTableRowBatchCloneRequest' export * from '../models/HubDbTableRowV3' export * from '../models/HubDbTableRowV3BatchUpdateRequest' export * from '../models/HubDbTableRowV3Request' @@ -20,5 +23,10 @@ export * from '../models/ImportResult' export * from '../models/ModelError' export * from '../models/NextPage' export * from '../models/Option' +export * from '../models/Paging' +export * from '../models/PreviousPage' +export * from '../models/RandomAccessCollectionResponseWithTotalHubDbTableRowV3' export * from '../models/SimpleUser' export * from '../models/StandardError' +export * from '../models/StreamingCollectionResponseWithTotalHubDbTableRowV3' +export * from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3' diff --git a/codegen/cms/hubdb/types/ObjectParamAPI.ts b/codegen/cms/hubdb/types/ObjectParamAPI.ts index e0d400129..b58364c02 100644 --- a/codegen/cms/hubdb/types/ObjectParamAPI.ts +++ b/codegen/cms/hubdb/types/ObjectParamAPI.ts @@ -1,12 +1,12 @@ import { HttpFile, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' +import { BatchInputHubDbTableRowBatchCloneRequest } from '../models/BatchInputHubDbTableRowBatchCloneRequest'; import { BatchInputHubDbTableRowV3BatchUpdateRequest } from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; import { BatchInputHubDbTableRowV3Request } from '../models/BatchInputHubDbTableRowV3Request'; import { BatchInputString } from '../models/BatchInputString'; import { BatchResponseHubDbTableRowV3 } from '../models/BatchResponseHubDbTableRowV3'; import { BatchResponseHubDbTableRowV3WithErrors } from '../models/BatchResponseHubDbTableRowV3WithErrors'; -import { CollectionResponseWithTotalHubDbTableRowV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; import { CollectionResponseWithTotalHubDbTableV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging'; import { HubDbTableCloneRequest } from '../models/HubDbTableCloneRequest'; import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; @@ -14,6 +14,7 @@ import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; import { HubDbTableV3 } from '../models/HubDbTableV3'; import { HubDbTableV3Request } from '../models/HubDbTableV3Request'; import { ImportResult } from '../models/ImportResult'; +import { UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 } from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; import { ObservableRowsApi } from "./ObservableAPI"; import { RowsApiRequestFactory, RowsApiResponseProcessor} from "../apis/RowsApi"; @@ -31,6 +32,12 @@ export interface RowsApiCloneDraftTableRowRequest { * @memberof RowsApicloneDraftTableRow */ rowId: string + /** + * + * @type string + * @memberof RowsApicloneDraftTableRow + */ + name?: string } export interface RowsApiCreateTableRowRequest { @@ -41,7 +48,7 @@ export interface RowsApiCreateTableRowRequest { */ tableIdOrName: string /** - * The row definition JSON, formatted as described above. + * * @type HubDbTableRowV3Request * @memberof RowsApicreateTableRow */ @@ -61,6 +68,12 @@ export interface RowsApiGetDraftTableRowByIdRequest { * @memberof RowsApigetDraftTableRowById */ rowId: string + /** + * + * @type boolean + * @memberof RowsApigetDraftTableRowById + */ + archived?: boolean } export interface RowsApiGetTableRowRequest { @@ -76,6 +89,12 @@ export interface RowsApiGetTableRowRequest { * @memberof RowsApigetTableRow */ rowId: string + /** + * + * @type boolean + * @memberof RowsApigetTableRow + */ + archived?: boolean } export interface RowsApiGetTableRowsRequest { @@ -109,6 +128,18 @@ export interface RowsApiGetTableRowsRequest { * @memberof RowsApigetTableRows */ properties?: Array + /** + * + * @type number + * @memberof RowsApigetTableRows + */ + offset?: number + /** + * + * @type boolean + * @memberof RowsApigetTableRows + */ + archived?: boolean } export interface RowsApiPurgeDraftTableRowRequest { @@ -157,6 +188,18 @@ export interface RowsApiReadDraftTableRowsRequest { * @memberof RowsApireadDraftTableRows */ properties?: Array + /** + * + * @type number + * @memberof RowsApireadDraftTableRows + */ + offset?: number + /** + * + * @type boolean + * @memberof RowsApireadDraftTableRows + */ + archived?: boolean } export interface RowsApiReplaceDraftTableRowRequest { @@ -173,7 +216,7 @@ export interface RowsApiReplaceDraftTableRowRequest { */ rowId: string /** - * The JSON object of the row + * * @type HubDbTableRowV3Request * @memberof RowsApireplaceDraftTableRow */ @@ -194,7 +237,7 @@ export interface RowsApiUpdateDraftTableRowRequest { */ rowId: string /** - * The JSON object of the row with necessary fields that needs to be updated. + * * @type HubDbTableRowV3Request * @memberof RowsApiupdateDraftTableRow */ @@ -209,25 +252,25 @@ export class ObjectRowsApi { } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param param the request object */ public cloneDraftTableRowWithHttpInfo(param: RowsApiCloneDraftTableRowRequest, options?: Configuration): Promise> { - return this.api.cloneDraftTableRowWithHttpInfo(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.cloneDraftTableRowWithHttpInfo(param.tableIdOrName, param.rowId, param.name, options).toPromise(); } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param param the request object */ public cloneDraftTableRow(param: RowsApiCloneDraftTableRowRequest, options?: Configuration): Promise { - return this.api.cloneDraftTableRow(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.cloneDraftTableRow(param.tableIdOrName, param.rowId, param.name, options).toPromise(); } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param param the request object */ @@ -236,7 +279,7 @@ export class ObjectRowsApi { } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param param the request object */ @@ -245,61 +288,61 @@ export class ObjectRowsApi { } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param param the request object */ public getDraftTableRowByIdWithHttpInfo(param: RowsApiGetDraftTableRowByIdRequest, options?: Configuration): Promise> { - return this.api.getDraftTableRowByIdWithHttpInfo(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.getDraftTableRowByIdWithHttpInfo(param.tableIdOrName, param.rowId, param.archived, options).toPromise(); } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param param the request object */ public getDraftTableRowById(param: RowsApiGetDraftTableRowByIdRequest, options?: Configuration): Promise { - return this.api.getDraftTableRowById(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.getDraftTableRowById(param.tableIdOrName, param.rowId, param.archived, options).toPromise(); } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param param the request object */ public getTableRowWithHttpInfo(param: RowsApiGetTableRowRequest, options?: Configuration): Promise> { - return this.api.getTableRowWithHttpInfo(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.getTableRowWithHttpInfo(param.tableIdOrName, param.rowId, param.archived, options).toPromise(); } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param param the request object */ public getTableRow(param: RowsApiGetTableRowRequest, options?: Configuration): Promise { - return this.api.getTableRow(param.tableIdOrName, param.rowId, options).toPromise(); + return this.api.getTableRow(param.tableIdOrName, param.rowId, param.archived, options).toPromise(); } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param param the request object */ - public getTableRowsWithHttpInfo(param: RowsApiGetTableRowsRequest, options?: Configuration): Promise> { - return this.api.getTableRowsWithHttpInfo(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, options).toPromise(); + public getTableRowsWithHttpInfo(param: RowsApiGetTableRowsRequest, options?: Configuration): Promise> { + return this.api.getTableRowsWithHttpInfo(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, param.offset, param.archived, options).toPromise(); } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param param the request object */ - public getTableRows(param: RowsApiGetTableRowsRequest, options?: Configuration): Promise { - return this.api.getTableRows(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, options).toPromise(); + public getTableRows(param: RowsApiGetTableRowsRequest, options?: Configuration): Promise { + return this.api.getTableRows(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, param.offset, param.archived, options).toPromise(); } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param param the request object */ @@ -308,7 +351,7 @@ export class ObjectRowsApi { } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param param the request object */ @@ -317,25 +360,25 @@ export class ObjectRowsApi { } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param param the request object */ - public readDraftTableRowsWithHttpInfo(param: RowsApiReadDraftTableRowsRequest, options?: Configuration): Promise> { - return this.api.readDraftTableRowsWithHttpInfo(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, options).toPromise(); + public readDraftTableRowsWithHttpInfo(param: RowsApiReadDraftTableRowsRequest, options?: Configuration): Promise> { + return this.api.readDraftTableRowsWithHttpInfo(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, param.offset, param.archived, options).toPromise(); } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param param the request object */ - public readDraftTableRows(param: RowsApiReadDraftTableRowsRequest, options?: Configuration): Promise { - return this.api.readDraftTableRows(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, options).toPromise(); + public readDraftTableRows(param: RowsApiReadDraftTableRowsRequest, options?: Configuration): Promise { + return this.api.readDraftTableRows(param.tableIdOrName, param.sort, param.after, param.limit, param.properties, param.offset, param.archived, options).toPromise(); } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param param the request object */ @@ -344,7 +387,7 @@ export class ObjectRowsApi { } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param param the request object */ @@ -353,7 +396,7 @@ export class ObjectRowsApi { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param param the request object */ @@ -362,7 +405,7 @@ export class ObjectRowsApi { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param param the request object */ @@ -383,11 +426,11 @@ export interface RowsBatchApiCloneDraftTableRowsRequest { */ tableIdOrName: string /** - * The JSON array of row ids - * @type BatchInputString + * + * @type BatchInputHubDbTableRowBatchCloneRequest * @memberof RowsBatchApicloneDraftTableRows */ - batchInputString: BatchInputString + batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest } export interface RowsBatchApiCreateDraftTableRowsRequest { @@ -398,7 +441,7 @@ export interface RowsBatchApiCreateDraftTableRowsRequest { */ tableIdOrName: string /** - * JSON array of row objects + * * @type BatchInputHubDbTableRowV3Request * @memberof RowsBatchApicreateDraftTableRows */ @@ -413,7 +456,7 @@ export interface RowsBatchApiPurgeDraftTableRowsRequest { */ tableIdOrName: string /** - * JSON array of row ids. + * * @type BatchInputString * @memberof RowsBatchApipurgeDraftTableRows */ @@ -428,7 +471,7 @@ export interface RowsBatchApiReadDraftTableRowsRequest { */ tableIdOrName: string /** - * JSON array of row ids. + * * @type BatchInputString * @memberof RowsBatchApireadDraftTableRows */ @@ -443,7 +486,7 @@ export interface RowsBatchApiReadTableRowsRequest { */ tableIdOrName: string /** - * The JSON array of row ids + * * @type BatchInputString * @memberof RowsBatchApireadTableRows */ @@ -458,7 +501,7 @@ export interface RowsBatchApiReplaceDraftTableRowsRequest { */ tableIdOrName: string /** - * JSON array of row objects. + * * @type BatchInputHubDbTableRowV3BatchUpdateRequest * @memberof RowsBatchApireplaceDraftTableRows */ @@ -473,7 +516,7 @@ export interface RowsBatchApiUpdateDraftTableRowsRequest { */ tableIdOrName: string /** - * JSON array of row objects. + * * @type BatchInputHubDbTableRowV3BatchUpdateRequest * @memberof RowsBatchApiupdateDraftTableRows */ @@ -488,25 +531,25 @@ export class ObjectRowsBatchApi { } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param param the request object */ public cloneDraftTableRowsWithHttpInfo(param: RowsBatchApiCloneDraftTableRowsRequest, options?: Configuration): Promise> { - return this.api.cloneDraftTableRowsWithHttpInfo(param.tableIdOrName, param.batchInputString, options).toPromise(); + return this.api.cloneDraftTableRowsWithHttpInfo(param.tableIdOrName, param.batchInputHubDbTableRowBatchCloneRequest, options).toPromise(); } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param param the request object */ public cloneDraftTableRows(param: RowsBatchApiCloneDraftTableRowsRequest, options?: Configuration): Promise { - return this.api.cloneDraftTableRows(param.tableIdOrName, param.batchInputString, options).toPromise(); + return this.api.cloneDraftTableRows(param.tableIdOrName, param.batchInputHubDbTableRowBatchCloneRequest, options).toPromise(); } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param param the request object */ @@ -515,7 +558,7 @@ export class ObjectRowsBatchApi { } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param param the request object */ @@ -524,7 +567,7 @@ export class ObjectRowsBatchApi { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param param the request object */ @@ -533,7 +576,7 @@ export class ObjectRowsBatchApi { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param param the request object */ @@ -542,7 +585,7 @@ export class ObjectRowsBatchApi { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param param the request object */ @@ -551,7 +594,7 @@ export class ObjectRowsBatchApi { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param param the request object */ @@ -560,7 +603,7 @@ export class ObjectRowsBatchApi { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param param the request object */ @@ -569,7 +612,7 @@ export class ObjectRowsBatchApi { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param param the request object */ @@ -578,7 +621,7 @@ export class ObjectRowsBatchApi { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param param the request object */ @@ -587,7 +630,7 @@ export class ObjectRowsBatchApi { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param param the request object */ @@ -596,7 +639,7 @@ export class ObjectRowsBatchApi { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param param the request object */ @@ -605,7 +648,7 @@ export class ObjectRowsBatchApi { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param param the request object */ @@ -635,7 +678,7 @@ export interface TablesApiCloneDraftTableRequest { */ tableIdOrName: string /** - * JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * * @type HubDbTableCloneRequest * @memberof TablesApicloneDraftTable */ @@ -644,7 +687,7 @@ export interface TablesApiCloneDraftTableRequest { export interface TablesApiCreateTableRequest { /** - * The JSON schema for the table being created. + * * @type HubDbTableV3Request * @memberof TablesApicreateTable */ @@ -736,6 +779,12 @@ export interface TablesApiGetAllDraftTablesRequest { * @memberof TablesApigetAllDraftTables */ updatedBefore?: Date + /** + * + * @type string + * @memberof TablesApigetAllDraftTables + */ + contentType?: string /** * Specifies whether to return archived tables. Defaults to `false`. * @type boolean @@ -799,6 +848,12 @@ export interface TablesApiGetAllTablesRequest { * @memberof TablesApigetAllTables */ updatedBefore?: Date + /** + * + * @type string + * @memberof TablesApigetAllTables + */ + contentType?: string /** * Specifies whether to return archived tables. Defaults to `false`. * @type boolean @@ -815,17 +870,23 @@ export interface TablesApiGetDraftTableDetailsByIdRequest { */ tableIdOrName: string /** - * Set this to `true` to populate foreign ID values in the result. + * * @type boolean * @memberof TablesApigetDraftTableDetailsById */ - includeForeignIds?: boolean + isGetLocalizedSchema?: boolean /** * Set this to `true` to return an archived table. Defaults to `false`. * @type boolean * @memberof TablesApigetDraftTableDetailsById */ archived?: boolean + /** + * Set this to `true` to populate foreign ID values in the result. + * @type boolean + * @memberof TablesApigetDraftTableDetailsById + */ + includeForeignIds?: boolean } export interface TablesApiGetTableDetailsRequest { @@ -836,17 +897,23 @@ export interface TablesApiGetTableDetailsRequest { */ tableIdOrName: string /** - * Set this to `true` to populate foreign ID values in the result. + * * @type boolean * @memberof TablesApigetTableDetails */ - includeForeignIds?: boolean + isGetLocalizedSchema?: boolean /** * Set this to `true` to return details for an archived table. Defaults to `false`. * @type boolean * @memberof TablesApigetTableDetails */ archived?: boolean + /** + * Set this to `true` to populate foreign ID values in the result. + * @type boolean + * @memberof TablesApigetTableDetails + */ + includeForeignIds?: boolean } export interface TablesApiImportDraftTableRequest { @@ -857,13 +924,13 @@ export interface TablesApiImportDraftTableRequest { */ tableIdOrName: string /** - * Configuration for the import in JSON format as described above. + * * @type string * @memberof TablesApiimportDraftTable */ config?: string /** - * The source CSV file to be imported. + * * @type HttpFile * @memberof TablesApiimportDraftTable */ @@ -923,23 +990,29 @@ export interface TablesApiUpdateDraftTableRequest { */ tableIdOrName: string /** - * The JSON schema for the table being updated. + * * @type HubDbTableV3Request * @memberof TablesApiupdateDraftTable */ hubDbTableV3Request: HubDbTableV3Request /** - * Set this to `true` to populate foreign ID values in the result. + * * @type boolean * @memberof TablesApiupdateDraftTable */ - includeForeignIds?: boolean + isGetLocalizedSchema?: boolean /** * Specifies whether to return archived tables. Defaults to `false`. * @type boolean * @memberof TablesApiupdateDraftTable */ archived?: boolean + /** + * Set this to `true` to populate foreign ID values in the result. + * @type boolean + * @memberof TablesApiupdateDraftTable + */ + includeForeignIds?: boolean } export class ObjectTablesApi { @@ -968,7 +1041,7 @@ export class ObjectTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param param the request object */ @@ -977,7 +1050,7 @@ export class ObjectTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param param the request object */ @@ -1004,7 +1077,7 @@ export class ObjectTablesApi { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param param the request object */ @@ -1013,7 +1086,7 @@ export class ObjectTablesApi { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param param the request object */ @@ -1022,7 +1095,7 @@ export class ObjectTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param param the request object */ @@ -1031,7 +1104,7 @@ export class ObjectTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param param the request object */ @@ -1045,7 +1118,7 @@ export class ObjectTablesApi { * @param param the request object */ public getAllDraftTablesWithHttpInfo(param: TablesApiGetAllDraftTablesRequest = {}, options?: Configuration): Promise> { - return this.api.getAllDraftTablesWithHttpInfo(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.archived, options).toPromise(); + return this.api.getAllDraftTablesWithHttpInfo(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.contentType, param.archived, options).toPromise(); } /** @@ -1054,65 +1127,65 @@ export class ObjectTablesApi { * @param param the request object */ public getAllDraftTables(param: TablesApiGetAllDraftTablesRequest = {}, options?: Configuration): Promise { - return this.api.getAllDraftTables(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.archived, options).toPromise(); + return this.api.getAllDraftTables(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.contentType, param.archived, options).toPromise(); } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param param the request object */ public getAllTablesWithHttpInfo(param: TablesApiGetAllTablesRequest = {}, options?: Configuration): Promise> { - return this.api.getAllTablesWithHttpInfo(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.archived, options).toPromise(); + return this.api.getAllTablesWithHttpInfo(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.contentType, param.archived, options).toPromise(); } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param param the request object */ public getAllTables(param: TablesApiGetAllTablesRequest = {}, options?: Configuration): Promise { - return this.api.getAllTables(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.archived, options).toPromise(); + return this.api.getAllTables(param.sort, param.after, param.limit, param.createdAt, param.createdAfter, param.createdBefore, param.updatedAt, param.updatedAfter, param.updatedBefore, param.contentType, param.archived, options).toPromise(); } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param param the request object */ public getDraftTableDetailsByIdWithHttpInfo(param: TablesApiGetDraftTableDetailsByIdRequest, options?: Configuration): Promise> { - return this.api.getDraftTableDetailsByIdWithHttpInfo(param.tableIdOrName, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.getDraftTableDetailsByIdWithHttpInfo(param.tableIdOrName, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param param the request object */ public getDraftTableDetailsById(param: TablesApiGetDraftTableDetailsByIdRequest, options?: Configuration): Promise { - return this.api.getDraftTableDetailsById(param.tableIdOrName, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.getDraftTableDetailsById(param.tableIdOrName, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param param the request object */ public getTableDetailsWithHttpInfo(param: TablesApiGetTableDetailsRequest, options?: Configuration): Promise> { - return this.api.getTableDetailsWithHttpInfo(param.tableIdOrName, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.getTableDetailsWithHttpInfo(param.tableIdOrName, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param param the request object */ public getTableDetails(param: TablesApiGetTableDetailsRequest, options?: Configuration): Promise { - return this.api.getTableDetails(param.tableIdOrName, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.getTableDetails(param.tableIdOrName, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param param the request object */ @@ -1121,7 +1194,7 @@ export class ObjectTablesApi { } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param param the request object */ @@ -1148,7 +1221,7 @@ export class ObjectTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param param the request object */ @@ -1157,7 +1230,7 @@ export class ObjectTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param param the request object */ @@ -1184,21 +1257,21 @@ export class ObjectTablesApi { } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param param the request object */ public updateDraftTableWithHttpInfo(param: TablesApiUpdateDraftTableRequest, options?: Configuration): Promise> { - return this.api.updateDraftTableWithHttpInfo(param.tableIdOrName, param.hubDbTableV3Request, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.updateDraftTableWithHttpInfo(param.tableIdOrName, param.hubDbTableV3Request, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param param the request object */ public updateDraftTable(param: TablesApiUpdateDraftTableRequest, options?: Configuration): Promise { - return this.api.updateDraftTable(param.tableIdOrName, param.hubDbTableV3Request, param.includeForeignIds, param.archived, options).toPromise(); + return this.api.updateDraftTable(param.tableIdOrName, param.hubDbTableV3Request, param.isGetLocalizedSchema, param.archived, param.includeForeignIds, options).toPromise(); } } diff --git a/codegen/cms/hubdb/types/ObservableAPI.ts b/codegen/cms/hubdb/types/ObservableAPI.ts index bc446a3de..6fa68125e 100644 --- a/codegen/cms/hubdb/types/ObservableAPI.ts +++ b/codegen/cms/hubdb/types/ObservableAPI.ts @@ -2,12 +2,12 @@ import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/htt import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; +import { BatchInputHubDbTableRowBatchCloneRequest } from '../models/BatchInputHubDbTableRowBatchCloneRequest'; import { BatchInputHubDbTableRowV3BatchUpdateRequest } from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; import { BatchInputHubDbTableRowV3Request } from '../models/BatchInputHubDbTableRowV3Request'; import { BatchInputString } from '../models/BatchInputString'; import { BatchResponseHubDbTableRowV3 } from '../models/BatchResponseHubDbTableRowV3'; import { BatchResponseHubDbTableRowV3WithErrors } from '../models/BatchResponseHubDbTableRowV3WithErrors'; -import { CollectionResponseWithTotalHubDbTableRowV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; import { CollectionResponseWithTotalHubDbTableV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging'; import { HubDbTableCloneRequest } from '../models/HubDbTableCloneRequest'; import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; @@ -15,6 +15,7 @@ import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; import { HubDbTableV3 } from '../models/HubDbTableV3'; import { HubDbTableV3Request } from '../models/HubDbTableV3Request'; import { ImportResult } from '../models/ImportResult'; +import { UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 } from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; import { RowsApiRequestFactory, RowsApiResponseProcessor} from "../apis/RowsApi"; export class ObservableRowsApi { @@ -33,13 +34,14 @@ export class ObservableRowsApi { } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param name */ - public cloneDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.cloneDraftTableRow(tableIdOrName, rowId, _options); + public cloneDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, name?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.cloneDraftTableRow(tableIdOrName, rowId, name, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -58,20 +60,21 @@ export class ObservableRowsApi { } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param name */ - public cloneDraftTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Observable { - return this.cloneDraftTableRowWithHttpInfo(tableIdOrName, rowId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public cloneDraftTableRow(tableIdOrName: string, rowId: string, name?: string, _options?: Configuration): Observable { + return this.cloneDraftTableRowWithHttpInfo(tableIdOrName, rowId, name, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param tableIdOrName The ID or name of the target table. - * @param hubDbTableRowV3Request The row definition JSON, formatted as described above. + * @param hubDbTableRowV3Request */ public createTableRowWithHttpInfo(tableIdOrName: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.createTableRow(tableIdOrName, hubDbTableRowV3Request, _options); @@ -93,23 +96,24 @@ export class ObservableRowsApi { } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param tableIdOrName The ID or name of the target table. - * @param hubDbTableRowV3Request The row definition JSON, formatted as described above. + * @param hubDbTableRowV3Request */ public createTableRow(tableIdOrName: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable { return this.createTableRowWithHttpInfo(tableIdOrName, hubDbTableRowV3Request, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getDraftTableRowByIdWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getDraftTableRowById(tableIdOrName, rowId, _options); + public getDraftTableRowByIdWithHttpInfo(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getDraftTableRowById(tableIdOrName, rowId, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -128,23 +132,25 @@ export class ObservableRowsApi { } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getDraftTableRowById(tableIdOrName: string, rowId: string, _options?: Configuration): Observable { - return this.getDraftTableRowByIdWithHttpInfo(tableIdOrName, rowId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getDraftTableRowById(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Observable { + return this.getDraftTableRowByIdWithHttpInfo(tableIdOrName, rowId, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getTableRowWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getTableRow(tableIdOrName, rowId, _options); + public getTableRowWithHttpInfo(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getTableRow(tableIdOrName, rowId, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -163,26 +169,29 @@ export class ObservableRowsApi { } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Observable { - return this.getTableRowWithHttpInfo(tableIdOrName, rowId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getTableRow(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Observable { + return this.getTableRowWithHttpInfo(tableIdOrName, rowId, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. See the above description for more details. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. + * @param offset + * @param archived */ - public getTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getTableRows(tableIdOrName, sort, after, limit, properties, _options); + public getTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getTableRows(tableIdOrName, sort, after, limit, properties, offset, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -201,20 +210,22 @@ export class ObservableRowsApi { } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. See the above description for more details. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. + * @param offset + * @param archived */ - public getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Observable { - return this.getTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Observable { + return this.getTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, offset, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row @@ -239,7 +250,7 @@ export class ObservableRowsApi { } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row @@ -249,16 +260,18 @@ export class ObservableRowsApi { } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. + * @param offset + * @param archived */ - public readDraftTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.readDraftTableRows(tableIdOrName, sort, after, limit, properties, _options); + public readDraftTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.readDraftTableRows(tableIdOrName, sort, after, limit, properties, offset, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -277,24 +290,26 @@ export class ObservableRowsApi { } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. + * @param offset + * @param archived */ - public readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Observable { - return this.readDraftTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Observable { + return this.readDraftTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, offset, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row + * @param hubDbTableRowV3Request */ public replaceDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.replaceDraftTableRow(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -316,22 +331,22 @@ export class ObservableRowsApi { } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row + * @param hubDbTableRowV3Request */ public replaceDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable { return this.replaceDraftTableRowWithHttpInfo(tableIdOrName, rowId, hubDbTableRowV3Request, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row with necessary fields that needs to be updated. + * @param hubDbTableRowV3Request */ public updateDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.updateDraftTableRow(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -353,11 +368,11 @@ export class ObservableRowsApi { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row with necessary fields that needs to be updated. + * @param hubDbTableRowV3Request */ public updateDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Observable { return this.updateDraftTableRowWithHttpInfo(tableIdOrName, rowId, hubDbTableRowV3Request, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -382,13 +397,13 @@ export class ObservableRowsBatchApi { } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputString The JSON array of row ids + * @param batchInputHubDbTableRowBatchCloneRequest */ - public cloneDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.cloneDraftTableRows(tableIdOrName, batchInputString, _options); + public cloneDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.cloneDraftTableRows(tableIdOrName, batchInputHubDbTableRowBatchCloneRequest, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -407,20 +422,20 @@ export class ObservableRowsBatchApi { } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputString The JSON array of row ids + * @param batchInputHubDbTableRowBatchCloneRequest */ - public cloneDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable { - return this.cloneDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public cloneDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest, _options?: Configuration): Observable { + return this.cloneDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowBatchCloneRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3Request JSON array of row objects + * @param batchInputHubDbTableRowV3Request */ public createDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3Request: BatchInputHubDbTableRowV3Request, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.createDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3Request, _options); @@ -442,20 +457,20 @@ export class ObservableRowsBatchApi { } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3Request JSON array of row objects + * @param batchInputHubDbTableRowV3Request */ public createDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3Request: BatchInputHubDbTableRowV3Request, _options?: Configuration): Observable { return this.createDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3Request, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public purgeDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.purgeDraftTableRows(tableIdOrName, batchInputString, _options); @@ -477,20 +492,20 @@ export class ObservableRowsBatchApi { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public purgeDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable { return this.purgeDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public readDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.readDraftTableRows(tableIdOrName, batchInputString, _options); @@ -512,20 +527,20 @@ export class ObservableRowsBatchApi { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public readDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable { return this.readDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param tableIdOrName The ID or name of the table to query. - * @param batchInputString The JSON array of row ids + * @param batchInputString */ public readTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.readTableRows(tableIdOrName, batchInputString, _options); @@ -547,20 +562,20 @@ export class ObservableRowsBatchApi { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param tableIdOrName The ID or name of the table to query. - * @param batchInputString The JSON array of row ids + * @param batchInputString */ public readTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Observable { return this.readTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public replaceDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.replaceDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -582,20 +597,20 @@ export class ObservableRowsBatchApi { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public replaceDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Observable { return this.replaceDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public updateDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.updateDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -617,10 +632,10 @@ export class ObservableRowsBatchApi { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public updateDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Observable { return this.updateDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -678,10 +693,10 @@ export class ObservableTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param tableIdOrName The ID or name of the table to clone. - * @param hubDbTableCloneRequest JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * @param hubDbTableCloneRequest */ public cloneDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableCloneRequest: HubDbTableCloneRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.cloneDraftTable(tableIdOrName, hubDbTableCloneRequest, _options); @@ -703,10 +718,10 @@ export class ObservableTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param tableIdOrName The ID or name of the table to clone. - * @param hubDbTableCloneRequest JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * @param hubDbTableCloneRequest */ public cloneDraftTable(tableIdOrName: string, hubDbTableCloneRequest: HubDbTableCloneRequest, _options?: Configuration): Observable { return this.cloneDraftTableWithHttpInfo(tableIdOrName, hubDbTableCloneRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -715,7 +730,7 @@ export class ObservableTablesApi { /** * Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account. * Create a new table - * @param hubDbTableV3Request The JSON schema for the table being created. + * @param hubDbTableV3Request */ public createTableWithHttpInfo(hubDbTableV3Request: HubDbTableV3Request, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.createTable(hubDbTableV3Request, _options); @@ -739,14 +754,14 @@ export class ObservableTablesApi { /** * Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account. * Create a new table - * @param hubDbTableV3Request The JSON schema for the table being created. + * @param hubDbTableV3Request */ public createTable(hubDbTableV3Request: HubDbTableV3Request, _options?: Configuration): Observable { return this.createTableWithHttpInfo(hubDbTableV3Request, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -771,7 +786,7 @@ export class ObservableTablesApi { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -781,7 +796,7 @@ export class ObservableTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -806,7 +821,7 @@ export class ObservableTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -827,10 +842,11 @@ export class ObservableTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllDraftTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getAllDraftTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllDraftTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getAllDraftTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -860,14 +876,15 @@ export class ObservableTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Observable { - return this.getAllDraftTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Observable { + return this.getAllDraftTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @@ -878,10 +895,11 @@ export class ObservableTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getAllTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getAllTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -900,7 +918,7 @@ export class ObservableTablesApi { } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @@ -911,21 +929,23 @@ export class ObservableTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Observable { - return this.getAllTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Observable { + return this.getAllTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getDraftTableDetailsByIdWithHttpInfo(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getDraftTableDetailsById(tableIdOrName, includeForeignIds, archived, _options); + public getDraftTableDetailsByIdWithHttpInfo(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getDraftTableDetailsById(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -944,25 +964,27 @@ export class ObservableTablesApi { } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getDraftTableDetailsById(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable { - return this.getDraftTableDetailsByIdWithHttpInfo(tableIdOrName, includeForeignIds, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getDraftTableDetailsById(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable { + return this.getDraftTableDetailsByIdWithHttpInfo(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return details for an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getTableDetailsWithHttpInfo(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getTableDetails(tableIdOrName, includeForeignIds, archived, _options); + public getTableDetailsWithHttpInfo(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getTableDetails(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -981,22 +1003,23 @@ export class ObservableTablesApi { } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return details for an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getTableDetails(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable { - return this.getTableDetailsWithHttpInfo(tableIdOrName, includeForeignIds, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getTableDetails(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable { + return this.getTableDetailsWithHttpInfo(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param tableIdOrName The ID of the destination table where data will be imported. - * @param config Configuration for the import in JSON format as described above. - * @param file The source CSV file to be imported. + * @param config + * @param file */ public importDraftTableWithHttpInfo(tableIdOrName: string, config?: string, file?: HttpFile, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.importDraftTable(tableIdOrName, config, file, _options); @@ -1018,11 +1041,11 @@ export class ObservableTablesApi { } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param tableIdOrName The ID of the destination table where data will be imported. - * @param config Configuration for the import in JSON format as described above. - * @param file The source CSV file to be imported. + * @param config + * @param file */ public importDraftTable(tableIdOrName: string, config?: string, file?: HttpFile, _options?: Configuration): Observable { return this.importDraftTableWithHttpInfo(tableIdOrName, config, file, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -1064,7 +1087,7 @@ export class ObservableTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param tableIdOrName The ID or name of the table to reset. * @param includeForeignIds Set this to `true` to populate foreign ID values in the response. @@ -1089,7 +1112,7 @@ export class ObservableTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param tableIdOrName The ID or name of the table to reset. * @param includeForeignIds Set this to `true` to populate foreign ID values in the response. @@ -1134,15 +1157,16 @@ export class ObservableTablesApi { } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param tableIdOrName The ID or name of the table to update. - * @param hubDbTableV3Request The JSON schema for the table being updated. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param hubDbTableV3Request + * @param isGetLocalizedSchema * @param archived Specifies whether to return archived tables. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public updateDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.updateDraftTable(tableIdOrName, hubDbTableV3Request, includeForeignIds, archived, _options); + public updateDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.updateDraftTable(tableIdOrName, hubDbTableV3Request, isGetLocalizedSchema, archived, includeForeignIds, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -1161,15 +1185,16 @@ export class ObservableTablesApi { } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param tableIdOrName The ID or name of the table to update. - * @param hubDbTableV3Request The JSON schema for the table being updated. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param hubDbTableV3Request + * @param isGetLocalizedSchema * @param archived Specifies whether to return archived tables. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Observable { - return this.updateDraftTableWithHttpInfo(tableIdOrName, hubDbTableV3Request, includeForeignIds, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Observable { + return this.updateDraftTableWithHttpInfo(tableIdOrName, hubDbTableV3Request, isGetLocalizedSchema, archived, includeForeignIds, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/cms/hubdb/types/PromiseAPI.ts b/codegen/cms/hubdb/types/PromiseAPI.ts index 71a8cf41d..e99902f21 100644 --- a/codegen/cms/hubdb/types/PromiseAPI.ts +++ b/codegen/cms/hubdb/types/PromiseAPI.ts @@ -1,12 +1,12 @@ import { HttpFile, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' +import { BatchInputHubDbTableRowBatchCloneRequest } from '../models/BatchInputHubDbTableRowBatchCloneRequest'; import { BatchInputHubDbTableRowV3BatchUpdateRequest } from '../models/BatchInputHubDbTableRowV3BatchUpdateRequest'; import { BatchInputHubDbTableRowV3Request } from '../models/BatchInputHubDbTableRowV3Request'; import { BatchInputString } from '../models/BatchInputString'; import { BatchResponseHubDbTableRowV3 } from '../models/BatchResponseHubDbTableRowV3'; import { BatchResponseHubDbTableRowV3WithErrors } from '../models/BatchResponseHubDbTableRowV3WithErrors'; -import { CollectionResponseWithTotalHubDbTableRowV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableRowV3ForwardPaging'; import { CollectionResponseWithTotalHubDbTableV3ForwardPaging } from '../models/CollectionResponseWithTotalHubDbTableV3ForwardPaging'; import { HubDbTableCloneRequest } from '../models/HubDbTableCloneRequest'; import { HubDbTableRowV3 } from '../models/HubDbTableRowV3'; @@ -14,6 +14,7 @@ import { HubDbTableRowV3Request } from '../models/HubDbTableRowV3Request'; import { HubDbTableV3 } from '../models/HubDbTableV3'; import { HubDbTableV3Request } from '../models/HubDbTableV3Request'; import { ImportResult } from '../models/ImportResult'; +import { UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3 } from '../models/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; import { ObservableRowsApi } from './ObservableAPI'; import { RowsApiRequestFactory, RowsApiResponseProcessor} from "../apis/RowsApi"; @@ -29,32 +30,34 @@ export class PromiseRowsApi { } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param name */ - public cloneDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Promise> { - const result = this.api.cloneDraftTableRowWithHttpInfo(tableIdOrName, rowId, _options); + public cloneDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, name?: string, _options?: Configuration): Promise> { + const result = this.api.cloneDraftTableRowWithHttpInfo(tableIdOrName, rowId, name, _options); return result.toPromise(); } /** - * Clones a single row in the `draft` version of the table. + * Clones a single row in the draft version of a table. * Clone a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param name */ - public cloneDraftTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { - const result = this.api.cloneDraftTableRow(tableIdOrName, rowId, _options); + public cloneDraftTableRow(tableIdOrName: string, rowId: string, name?: string, _options?: Configuration): Promise { + const result = this.api.cloneDraftTableRow(tableIdOrName, rowId, name, _options); return result.toPromise(); } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param tableIdOrName The ID or name of the target table. - * @param hubDbTableRowV3Request The row definition JSON, formatted as described above. + * @param hubDbTableRowV3Request */ public createTableRowWithHttpInfo(tableIdOrName: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise> { const result = this.api.createTableRowWithHttpInfo(tableIdOrName, hubDbTableRowV3Request, _options); @@ -62,10 +65,10 @@ export class PromiseRowsApi { } /** - * Add a new row to a HubDB table. New rows will be added to the `draft` version of the table. Use `publish` endpoint to push these changes to published version. + * Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version. * Add a new row to a table * @param tableIdOrName The ID or name of the target table. - * @param hubDbTableRowV3Request The row definition JSON, formatted as described above. + * @param hubDbTableRowV3Request */ public createTableRow(tableIdOrName: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { const result = this.api.createTableRow(tableIdOrName, hubDbTableRowV3Request, _options); @@ -73,79 +76,87 @@ export class PromiseRowsApi { } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getDraftTableRowByIdWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Promise> { - const result = this.api.getDraftTableRowByIdWithHttpInfo(tableIdOrName, rowId, _options); + public getDraftTableRowByIdWithHttpInfo(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.getDraftTableRowByIdWithHttpInfo(tableIdOrName, rowId, archived, _options); return result.toPromise(); } /** - * Get a single row by ID from a table\'s `draft` version. + * Get a single row by ID from a table\'s draft version. * Get a row from the draft table * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getDraftTableRowById(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { - const result = this.api.getDraftTableRowById(tableIdOrName, rowId, _options); + public getDraftTableRowById(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.getDraftTableRowById(tableIdOrName, rowId, archived, _options); return result.toPromise(); } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getTableRowWithHttpInfo(tableIdOrName: string, rowId: string, _options?: Configuration): Promise> { - const result = this.api.getTableRowWithHttpInfo(tableIdOrName, rowId, _options); + public getTableRowWithHttpInfo(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.getTableRowWithHttpInfo(tableIdOrName, rowId, archived, _options); return result.toPromise(); } /** - * Get a single row by ID from a table\'s `published` version. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Get a single row by ID from the published version of a table. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get a table row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row + * @param archived */ - public getTableRow(tableIdOrName: string, rowId: string, _options?: Configuration): Promise { - const result = this.api.getTableRow(tableIdOrName, rowId, _options); + public getTableRow(tableIdOrName: string, rowId: string, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.getTableRow(tableIdOrName, rowId, archived, _options); return result.toPromise(); } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. See the above description for more details. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. + * @param offset + * @param archived */ - public getTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise> { - const result = this.api.getTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, _options); + public getTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.getTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, offset, archived, _options); return result.toPromise(); } /** - * Returns a set of rows in the `published` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. + * Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. **Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access. * Get rows for a table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. See the above description for more details. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. + * @param offset + * @param archived */ - public getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise { - const result = this.api.getTableRows(tableIdOrName, sort, after, limit, properties, _options); + public getTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.getTableRows(tableIdOrName, sort, after, limit, properties, offset, archived, _options); return result.toPromise(); } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row @@ -156,7 +167,7 @@ export class PromiseRowsApi { } /** - * Permanently deletes a row from a table\'s `draft` version. + * Permanently deletes a row from a table\'s draft version. * Permanently deletes a row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row @@ -167,39 +178,43 @@ export class PromiseRowsApi { } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. + * @param offset + * @param archived */ - public readDraftTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise> { - const result = this.api.readDraftTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, _options); + public readDraftTableRowsWithHttpInfo(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.readDraftTableRowsWithHttpInfo(tableIdOrName, sort, after, limit, properties, offset, archived, _options); return result.toPromise(); } /** - * Returns rows in the `draft` version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. + * Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. * Get rows from draft table * @param tableIdOrName The ID or name of the table to query. * @param sort Specifies the column names to sort the results by. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. * @param limit The maximum number of results to return. Default is `1000`. * @param properties Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. + * @param offset + * @param archived */ - public readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, _options?: Configuration): Promise { - const result = this.api.readDraftTableRows(tableIdOrName, sort, after, limit, properties, _options); + public readDraftTableRows(tableIdOrName: string, sort?: Array, after?: string, limit?: number, properties?: Array, offset?: number, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.readDraftTableRows(tableIdOrName, sort, after, limit, properties, offset, archived, _options); return result.toPromise(); } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row + * @param hubDbTableRowV3Request */ public replaceDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise> { const result = this.api.replaceDraftTableRowWithHttpInfo(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -207,11 +222,11 @@ export class PromiseRowsApi { } /** - * Replace a single row in the table\'s `draft` version. All the column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn\'t define that value, it will be deleted. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Replaces an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row + * @param hubDbTableRowV3Request */ public replaceDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { const result = this.api.replaceDraftTableRow(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -219,11 +234,11 @@ export class PromiseRowsApi { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row with necessary fields that needs to be updated. + * @param hubDbTableRowV3Request */ public updateDraftTableRowWithHttpInfo(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise> { const result = this.api.updateDraftTableRowWithHttpInfo(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -231,11 +246,11 @@ export class PromiseRowsApi { } /** - * Sparse updates a single row in the table\'s `draft` version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the `Create a row` endpoint for instructions on how to format the JSON row definitions. + * Sparse updates a single row in the table\'s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the \"Create a row\" endpoint for instructions on how to format the JSON row definitions. * Updates an existing row * @param tableIdOrName The ID or name of the table * @param rowId The ID of the row - * @param hubDbTableRowV3Request The JSON object of the row with necessary fields that needs to be updated. + * @param hubDbTableRowV3Request */ public updateDraftTableRow(tableIdOrName: string, rowId: string, hubDbTableRowV3Request: HubDbTableRowV3Request, _options?: Configuration): Promise { const result = this.api.updateDraftTableRow(tableIdOrName, rowId, hubDbTableRowV3Request, _options); @@ -262,32 +277,32 @@ export class PromiseRowsBatchApi { } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputString The JSON array of row ids + * @param batchInputHubDbTableRowBatchCloneRequest */ - public cloneDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise> { - const result = this.api.cloneDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options); + public cloneDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest, _options?: Configuration): Promise> { + const result = this.api.cloneDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowBatchCloneRequest, _options); return result.toPromise(); } /** - * Clones rows in the `draft` version of the specified table, given a set of row ids. Maximum of 100 row ids per call. + * Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call. * Clone rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputString The JSON array of row ids + * @param batchInputHubDbTableRowBatchCloneRequest */ - public cloneDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { - const result = this.api.cloneDraftTableRows(tableIdOrName, batchInputString, _options); + public cloneDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowBatchCloneRequest: BatchInputHubDbTableRowBatchCloneRequest, _options?: Configuration): Promise { + const result = this.api.cloneDraftTableRows(tableIdOrName, batchInputHubDbTableRowBatchCloneRequest, _options); return result.toPromise(); } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3Request JSON array of row objects + * @param batchInputHubDbTableRowV3Request */ public createDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3Request: BatchInputHubDbTableRowV3Request, _options?: Configuration): Promise> { const result = this.api.createDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3Request, _options); @@ -295,10 +310,10 @@ export class PromiseRowsBatchApi { } /** - * Creates rows in the `draft` version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. + * Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example. * Create rows in batch * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3Request JSON array of row objects + * @param batchInputHubDbTableRowV3Request */ public createDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3Request: BatchInputHubDbTableRowV3Request, _options?: Configuration): Promise { const result = this.api.createDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3Request, _options); @@ -306,10 +321,10 @@ export class PromiseRowsBatchApi { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public purgeDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise> { const result = this.api.purgeDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options); @@ -317,10 +332,10 @@ export class PromiseRowsBatchApi { } /** - * Permanently deletes rows from the `draft` version of the table, given a set of row ids. Maximum of 100 row ids per call. + * Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call. * Permanently deletes rows * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public purgeDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { const result = this.api.purgeDraftTableRows(tableIdOrName, batchInputString, _options); @@ -328,10 +343,10 @@ export class PromiseRowsBatchApi { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public readDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise> { const result = this.api.readDraftTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options); @@ -339,10 +354,10 @@ export class PromiseRowsBatchApi { } /** - * Returns rows in the `draft` version of the specified table, given a set of row ids. + * Returns rows in the draft version of the specified table, given a set of row IDs. * Get a set of rows from draft table * @param tableIdOrName The ID or name of the table - * @param batchInputString JSON array of row ids. + * @param batchInputString */ public readDraftTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { const result = this.api.readDraftTableRows(tableIdOrName, batchInputString, _options); @@ -350,10 +365,10 @@ export class PromiseRowsBatchApi { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param tableIdOrName The ID or name of the table to query. - * @param batchInputString The JSON array of row ids + * @param batchInputString */ public readTableRowsWithHttpInfo(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise> { const result = this.api.readTableRowsWithHttpInfo(tableIdOrName, batchInputString, _options); @@ -361,10 +376,10 @@ export class PromiseRowsBatchApi { } /** - * Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. + * Returns rows in the published version of the specified table, given a set of row IDs. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. * Get a set of rows * @param tableIdOrName The ID or name of the table to query. - * @param batchInputString The JSON array of row ids + * @param batchInputString */ public readTableRows(tableIdOrName: string, batchInputString: BatchInputString, _options?: Configuration): Promise { const result = this.api.readTableRows(tableIdOrName, batchInputString, _options); @@ -372,10 +387,10 @@ export class PromiseRowsBatchApi { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public replaceDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise> { const result = this.api.replaceDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -383,10 +398,10 @@ export class PromiseRowsBatchApi { } /** - * Replaces multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Replace rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public replaceDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise { const result = this.api.replaceDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -394,10 +409,10 @@ export class PromiseRowsBatchApi { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public updateDraftTableRowsWithHttpInfo(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise> { const result = this.api.updateDraftTableRowsWithHttpInfo(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -405,10 +420,10 @@ export class PromiseRowsBatchApi { } /** - * Updates multiple rows as a batch in the `draft` version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. + * Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row. * Update rows in batch in draft table * @param tableIdOrName The ID or name of the table - * @param batchInputHubDbTableRowV3BatchUpdateRequest JSON array of row objects. + * @param batchInputHubDbTableRowV3BatchUpdateRequest */ public updateDraftTableRows(tableIdOrName: string, batchInputHubDbTableRowV3BatchUpdateRequest: BatchInputHubDbTableRowV3BatchUpdateRequest, _options?: Configuration): Promise { const result = this.api.updateDraftTableRows(tableIdOrName, batchInputHubDbTableRowV3BatchUpdateRequest, _options); @@ -455,10 +470,10 @@ export class PromiseTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param tableIdOrName The ID or name of the table to clone. - * @param hubDbTableCloneRequest JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * @param hubDbTableCloneRequest */ public cloneDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableCloneRequest: HubDbTableCloneRequest, _options?: Configuration): Promise> { const result = this.api.cloneDraftTableWithHttpInfo(tableIdOrName, hubDbTableCloneRequest, _options); @@ -466,10 +481,10 @@ export class PromiseTablesApi { } /** - * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the `body` parameter. This will create the cloned table as a `draft`. + * Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft. * Clone a table * @param tableIdOrName The ID or name of the table to clone. - * @param hubDbTableCloneRequest JSON object with the properties newName and newLabel. You can set copyRows to false to clone the table with copying rows and default is true. + * @param hubDbTableCloneRequest */ public cloneDraftTable(tableIdOrName: string, hubDbTableCloneRequest: HubDbTableCloneRequest, _options?: Configuration): Promise { const result = this.api.cloneDraftTable(tableIdOrName, hubDbTableCloneRequest, _options); @@ -479,7 +494,7 @@ export class PromiseTablesApi { /** * Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account. * Create a new table - * @param hubDbTableV3Request The JSON schema for the table being created. + * @param hubDbTableV3Request */ public createTableWithHttpInfo(hubDbTableV3Request: HubDbTableV3Request, _options?: Configuration): Promise> { const result = this.api.createTableWithHttpInfo(hubDbTableV3Request, _options); @@ -489,7 +504,7 @@ export class PromiseTablesApi { /** * Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account. * Create a new table - * @param hubDbTableV3Request The JSON schema for the table being created. + * @param hubDbTableV3Request */ public createTable(hubDbTableV3Request: HubDbTableV3Request, _options?: Configuration): Promise { const result = this.api.createTable(hubDbTableV3Request, _options); @@ -497,7 +512,7 @@ export class PromiseTablesApi { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -508,7 +523,7 @@ export class PromiseTablesApi { } /** - * Exports the `draft` version of a table to CSV / EXCEL format. + * Exports the draft version of a table to CSV / EXCEL format. * Export a draft table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -519,7 +534,7 @@ export class PromiseTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -530,7 +545,7 @@ export class PromiseTablesApi { } /** - * Exports the `published` version of a table to CSV / EXCEL format. + * Exports the published version of a table in a specified format. * Export a published version of a table * @param tableIdOrName The ID or name of the table to export. * @param format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`. @@ -552,10 +567,11 @@ export class PromiseTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllDraftTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise> { - const result = this.api.getAllDraftTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllDraftTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.getAllDraftTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); return result.toPromise(); } @@ -571,15 +587,16 @@ export class PromiseTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise { - const result = this.api.getAllDraftTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllDraftTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.getAllDraftTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); return result.toPromise(); } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @@ -590,15 +607,16 @@ export class PromiseTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise> { - const result = this.api.getAllTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllTablesWithHttpInfo(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise> { + const result = this.api.getAllTablesWithHttpInfo(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); return result.toPromise(); } /** - * Returns the details for the `published` version of each table defined in an account, including column definitions. + * Returns the details for the published version of each table defined in an account, including column definitions. * Get all published tables * @param sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. * @param after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @@ -609,67 +627,72 @@ export class PromiseTablesApi { * @param updatedAt Only return tables last updated at exactly the specified time. * @param updatedAfter Only return tables last updated after the specified time. * @param updatedBefore Only return tables last updated before the specified time. + * @param contentType * @param archived Specifies whether to return archived tables. Defaults to `false`. */ - public getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, archived?: boolean, _options?: Configuration): Promise { - const result = this.api.getAllTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, archived, _options); + public getAllTables(sort?: Array, after?: string, limit?: number, createdAt?: Date, createdAfter?: Date, createdBefore?: Date, updatedAt?: Date, updatedAfter?: Date, updatedBefore?: Date, contentType?: string, archived?: boolean, _options?: Configuration): Promise { + const result = this.api.getAllTables(sort, after, limit, createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, contentType, archived, _options); return result.toPromise(); } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getDraftTableDetailsByIdWithHttpInfo(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise> { - const result = this.api.getDraftTableDetailsByIdWithHttpInfo(tableIdOrName, includeForeignIds, archived, _options); + public getDraftTableDetailsByIdWithHttpInfo(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise> { + const result = this.api.getDraftTableDetailsByIdWithHttpInfo(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } /** - * Get the details for the `draft` version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. + * Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. * Get details for a draft table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getDraftTableDetailsById(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { - const result = this.api.getDraftTableDetailsById(tableIdOrName, includeForeignIds, archived, _options); + public getDraftTableDetailsById(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { + const result = this.api.getDraftTableDetailsById(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return details for an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getTableDetailsWithHttpInfo(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise> { - const result = this.api.getTableDetailsWithHttpInfo(tableIdOrName, includeForeignIds, archived, _options); + public getTableDetailsWithHttpInfo(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise> { + const result = this.api.getTableDetailsWithHttpInfo(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } /** - * Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. - * Get details for a published table + * Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you\'ll need to include the HubSpot account ID in a `portalId` query parameter. + * Get details of a published table * @param tableIdOrName The ID or name of the table to return. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param isGetLocalizedSchema * @param archived Set this to `true` to return details for an archived table. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public getTableDetails(tableIdOrName: string, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { - const result = this.api.getTableDetails(tableIdOrName, includeForeignIds, archived, _options); + public getTableDetails(tableIdOrName: string, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { + const result = this.api.getTableDetails(tableIdOrName, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param tableIdOrName The ID of the destination table where data will be imported. - * @param config Configuration for the import in JSON format as described above. - * @param file The source CSV file to be imported. + * @param config + * @param file */ public importDraftTableWithHttpInfo(tableIdOrName: string, config?: string, file?: HttpFile, _options?: Configuration): Promise> { const result = this.api.importDraftTableWithHttpInfo(tableIdOrName, config, file, _options); @@ -677,11 +700,11 @@ export class PromiseTablesApi { } /** - * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. + * Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import. * Import data into draft table * @param tableIdOrName The ID of the destination table where data will be imported. - * @param config Configuration for the import in JSON format as described above. - * @param file The source CSV file to be imported. + * @param config + * @param file */ public importDraftTable(tableIdOrName: string, config?: string, file?: HttpFile, _options?: Configuration): Promise { const result = this.api.importDraftTable(tableIdOrName, config, file, _options); @@ -711,7 +734,7 @@ export class PromiseTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param tableIdOrName The ID or name of the table to reset. * @param includeForeignIds Set this to `true` to populate foreign ID values in the response. @@ -722,7 +745,7 @@ export class PromiseTablesApi { } /** - * Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made. + * Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. * Reset a draft table * @param tableIdOrName The ID or name of the table to reset. * @param includeForeignIds Set this to `true` to populate foreign ID values in the response. @@ -755,28 +778,30 @@ export class PromiseTablesApi { } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param tableIdOrName The ID or name of the table to update. - * @param hubDbTableV3Request The JSON schema for the table being updated. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param hubDbTableV3Request + * @param isGetLocalizedSchema * @param archived Specifies whether to return archived tables. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public updateDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise> { - const result = this.api.updateDraftTableWithHttpInfo(tableIdOrName, hubDbTableV3Request, includeForeignIds, archived, _options); + public updateDraftTableWithHttpInfo(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise> { + const result = this.api.updateDraftTableWithHttpInfo(tableIdOrName, hubDbTableV3Request, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } /** - * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. + * Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. * Update an existing table * @param tableIdOrName The ID or name of the table to update. - * @param hubDbTableV3Request The JSON schema for the table being updated. - * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. + * @param hubDbTableV3Request + * @param isGetLocalizedSchema * @param archived Specifies whether to return archived tables. Defaults to `false`. + * @param includeForeignIds Set this to `true` to populate foreign ID values in the result. */ - public updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, includeForeignIds?: boolean, archived?: boolean, _options?: Configuration): Promise { - const result = this.api.updateDraftTable(tableIdOrName, hubDbTableV3Request, includeForeignIds, archived, _options); + public updateDraftTable(tableIdOrName: string, hubDbTableV3Request: HubDbTableV3Request, isGetLocalizedSchema?: boolean, archived?: boolean, includeForeignIds?: boolean, _options?: Configuration): Promise { + const result = this.api.updateDraftTable(tableIdOrName, hubDbTableV3Request, isGetLocalizedSchema, archived, includeForeignIds, _options); return result.toPromise(); } From 7dd5767d155da039a957b68d2fe07126b96f34e6 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Sep 2024 15:26:51 +0300 Subject: [PATCH 03/46] Codegen: CMS Source Code. --- codegen/cms/source_code/apis/ContentApi.ts | 4 +- codegen/cms/source_code/apis/ExtractApi.ts | 123 ++++++++++-- .../source_code/apis/SourceCodeExtractApi.ts | 178 ------------------ codegen/cms/source_code/apis/ValidationApi.ts | 2 +- codegen/cms/source_code/index.ts | 2 +- .../cms/source_code/models/ActionResponse.ts | 2 +- .../source_code/models/AssetFileMetadata.ts | 9 +- codegen/cms/source_code/models/ErrorDetail.ts | 2 +- .../source_code/models/FileExtractRequest.ts | 2 +- codegen/cms/source_code/models/ModelError.ts | 2 +- codegen/cms/source_code/models/TaskLocator.ts | 2 +- .../cms/source_code/types/ObjectParamAPI.ts | 117 +++++------- .../cms/source_code/types/ObservableAPI.ts | 143 +++++--------- codegen/cms/source_code/types/PromiseAPI.ts | 103 ++++------ 14 files changed, 248 insertions(+), 443 deletions(-) delete mode 100644 codegen/cms/source_code/apis/SourceCodeExtractApi.ts diff --git a/codegen/cms/source_code/apis/ContentApi.ts b/codegen/cms/source_code/apis/ContentApi.ts index 8844533d8..a2c742a6e 100644 --- a/codegen/cms/source_code/apis/ContentApi.ts +++ b/codegen/cms/source_code/apis/ContentApi.ts @@ -68,7 +68,7 @@ export class ContentApiRequestFactory extends BaseAPIRequestFactory { * Create a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public async create(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -143,7 +143,7 @@ export class ContentApiRequestFactory extends BaseAPIRequestFactory { * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public async createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/cms/source_code/apis/ExtractApi.ts b/codegen/cms/source_code/apis/ExtractApi.ts index 57cdb6919..35d421f24 100644 --- a/codegen/cms/source_code/apis/ExtractApi.ts +++ b/codegen/cms/source_code/apis/ExtractApi.ts @@ -8,6 +8,9 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { ActionResponse } from '../models/ActionResponse'; +import { FileExtractRequest } from '../models/FileExtractRequest'; +import { TaskLocator } from '../models/TaskLocator'; /** * no description @@ -15,28 +18,76 @@ import {SecurityAuthentication} from '../auth/auth'; export class ExtractApiRequestFactory extends BaseAPIRequestFactory { /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file - * @param path The file system location of the zip file. + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param fileExtractRequest */ - public async extractByPath(path: string, _options?: Configuration): Promise { + public async doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError("ExtractApi", "extractByPath", "path"); + // verify required parameter 'fileExtractRequest' is not null or undefined + if (fileExtractRequest === null || fileExtractRequest === undefined) { + throw new RequiredError("ExtractApi", "doAsync", "fileExtractRequest"); } // Path Params - const localVarPath = '/cms/v3/source-code/extract/{path}' - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + const localVarPath = '/cms/v3/source-code/extract/async'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(fileExtractRequest, "FileExtractRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param taskId The extraction task ID returned by the initial `extract/async` request. + */ + public async getAsyncStatus(taskId: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'taskId' is not null or undefined + if (taskId === null || taskId === undefined) { + throw new RequiredError("ExtractApi", "getAsyncStatus", "taskId"); + } + + + // Path Params + const localVarPath = '/cms/v3/source-code/extract/async/tasks/{taskId}/status' + .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["oauth2"] @@ -60,13 +111,53 @@ export class ExtractApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to extractByPath + * @params response Response returned by the server for a request to doAsync * @throws ApiException if the response code was not in [200, 299] */ - public async extractByPathWithHttpInfo(response: ResponseContext): Promise> { + public async doAsyncWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + if (isCodeInRange("202", response.httpStatusCode)) { + const body: TaskLocator = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TaskLocator", "" + ) as TaskLocator; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TaskLocator = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TaskLocator", "" + ) as TaskLocator; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getAsyncStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async getAsyncStatusWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ActionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ActionResponse", "" + ) as ActionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("0", response.httpStatusCode)) { const body: Error = ObjectSerializer.deserialize( @@ -78,10 +169,10 @@ export class ExtractApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( + const body: ActionResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; + "ActionResponse", "" + ) as ActionResponse; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } diff --git a/codegen/cms/source_code/apis/SourceCodeExtractApi.ts b/codegen/cms/source_code/apis/SourceCodeExtractApi.ts deleted file mode 100644 index 02e7202bc..000000000 --- a/codegen/cms/source_code/apis/SourceCodeExtractApi.ts +++ /dev/null @@ -1,178 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { ActionResponse } from '../models/ActionResponse'; -import { FileExtractRequest } from '../models/FileExtractRequest'; -import { TaskLocator } from '../models/TaskLocator'; - -/** - * no description - */ -export class SourceCodeExtractApiRequestFactory extends BaseAPIRequestFactory { - - /** - * @param fileExtractRequest - */ - public async doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'fileExtractRequest' is not null or undefined - if (fileExtractRequest === null || fileExtractRequest === undefined) { - throw new RequiredError("SourceCodeExtractApi", "doAsync", "fileExtractRequest"); - } - - - // Path Params - const localVarPath = '/cms/v3/source-code/extract/async'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(fileExtractRequest, "FileExtractRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param taskId - */ - public async getAsyncStatus(taskId: number, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'taskId' is not null or undefined - if (taskId === null || taskId === undefined) { - throw new RequiredError("SourceCodeExtractApi", "getAsyncStatus", "taskId"); - } - - - // Path Params - const localVarPath = '/cms/v3/source-code/extract/async/tasks/{taskId}/status' - .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class SourceCodeExtractApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doAsync - * @throws ApiException if the response code was not in [200, 299] - */ - public async doAsyncWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("202", response.httpStatusCode)) { - const body: TaskLocator = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "TaskLocator", "" - ) as TaskLocator; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: TaskLocator = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "TaskLocator", "" - ) as TaskLocator; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getAsyncStatus - * @throws ApiException if the response code was not in [200, 299] - */ - public async getAsyncStatusWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/cms/source_code/apis/ValidationApi.ts b/codegen/cms/source_code/apis/ValidationApi.ts index eba6e2a43..9bf691b05 100644 --- a/codegen/cms/source_code/apis/ValidationApi.ts +++ b/codegen/cms/source_code/apis/ValidationApi.ts @@ -20,7 +20,7 @@ export class ValidationApiRequestFactory extends BaseAPIRequestFactory { * Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type. * Validate the contents of a file * @param path The file system location of the file. - * @param file The file to validate. + * @param file */ public async doValidate(path: string, file?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/cms/source_code/index.ts b/codegen/cms/source_code/index.ts index 997a9ecb2..462932267 100644 --- a/codegen/cms/source_code/index.ts +++ b/codegen/cms/source_code/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseContentApi as ContentApi, PromiseExtractApi as ExtractApi, PromiseMetadataApi as MetadataApi, PromiseSourceCodeExtractApi as SourceCodeExtractApi, PromiseValidationApi as ValidationApi } from './types/PromiseAPI'; +export { PromiseContentApi as ContentApi, PromiseExtractApi as ExtractApi, PromiseMetadataApi as MetadataApi, PromiseValidationApi as ValidationApi } from './types/PromiseAPI'; diff --git a/codegen/cms/source_code/models/ActionResponse.ts b/codegen/cms/source_code/models/ActionResponse.ts index d1a160d3a..fae358661 100644 --- a/codegen/cms/source_code/models/ActionResponse.ts +++ b/codegen/cms/source_code/models/ActionResponse.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/source_code/models/AssetFileMetadata.ts b/codegen/cms/source_code/models/AssetFileMetadata.ts index 7718d6ed4..b303e9554 100644 --- a/codegen/cms/source_code/models/AssetFileMetadata.ts +++ b/codegen/cms/source_code/models/AssetFileMetadata.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* The object metadata of a file. -*/ export class AssetFileMetadata { /** * Timestamp of when the object was first created. @@ -52,7 +49,7 @@ export class AssetFileMetadata { "name": "createdAt", "baseName": "createdAt", "type": "number", - "format": "int32" + "format": "int64" }, { "name": "archivedAt", @@ -94,7 +91,7 @@ export class AssetFileMetadata { "name": "updatedAt", "baseName": "updatedAt", "type": "number", - "format": "int32" + "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/source_code/models/ErrorDetail.ts b/codegen/cms/source_code/models/ErrorDetail.ts index cafea5249..a7e32d8cd 100644 --- a/codegen/cms/source_code/models/ErrorDetail.ts +++ b/codegen/cms/source_code/models/ErrorDetail.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/source_code/models/FileExtractRequest.ts b/codegen/cms/source_code/models/FileExtractRequest.ts index 4b4e2c2d9..299c46c5c 100644 --- a/codegen/cms/source_code/models/FileExtractRequest.ts +++ b/codegen/cms/source_code/models/FileExtractRequest.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/source_code/models/ModelError.ts b/codegen/cms/source_code/models/ModelError.ts index 6bce8b422..36e6001a0 100644 --- a/codegen/cms/source_code/models/ModelError.ts +++ b/codegen/cms/source_code/models/ModelError.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/source_code/models/TaskLocator.ts b/codegen/cms/source_code/models/TaskLocator.ts index 7beaac1c4..c7fb8fa51 100644 --- a/codegen/cms/source_code/models/TaskLocator.ts +++ b/codegen/cms/source_code/models/TaskLocator.ts @@ -1,6 +1,6 @@ /** * CMS Source Code - * Endpoints for interacting with files in the CMS Developer File System. These files include HTML templates, CSS, JS, modules, and other assets which are used to create CMS content. + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/cms/source_code/types/ObjectParamAPI.ts b/codegen/cms/source_code/types/ObjectParamAPI.ts index d76d5ebeb..d6e0990fa 100644 --- a/codegen/cms/source_code/types/ObjectParamAPI.ts +++ b/codegen/cms/source_code/types/ObjectParamAPI.ts @@ -38,7 +38,7 @@ export interface ContentApiCreateRequest { */ path: string /** - * The file to upload. + * * @type HttpFile * @memberof ContentApicreate */ @@ -59,7 +59,7 @@ export interface ContentApiCreateOrUpdateRequest { */ path: string /** - * The file to upload. + * * @type HttpFile * @memberof ContentApicreateOrUpdate */ @@ -165,13 +165,22 @@ export class ObjectContentApi { import { ObservableExtractApi } from "./ObservableAPI"; import { ExtractApiRequestFactory, ExtractApiResponseProcessor} from "../apis/ExtractApi"; -export interface ExtractApiExtractByPathRequest { +export interface ExtractApiDoAsyncRequest { /** - * The file system location of the zip file. - * @type string - * @memberof ExtractApiextractByPath + * + * @type FileExtractRequest + * @memberof ExtractApidoAsync */ - path: string + fileExtractRequest: FileExtractRequest +} + +export interface ExtractApiGetAsyncStatusRequest { + /** + * The extraction task ID returned by the initial `extract/async` request. + * @type number + * @memberof ExtractApigetAsyncStatus + */ + taskId: number } export class ObjectExtractApi { @@ -182,21 +191,39 @@ export class ObjectExtractApi { } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param param the request object + */ + public doAsyncWithHttpInfo(param: ExtractApiDoAsyncRequest, options?: Configuration): Promise> { + return this.api.doAsyncWithHttpInfo(param.fileExtractRequest, options).toPromise(); + } + + /** + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file * @param param the request object */ - public extractByPathWithHttpInfo(param: ExtractApiExtractByPathRequest, options?: Configuration): Promise> { - return this.api.extractByPathWithHttpInfo(param.path, options).toPromise(); + public doAsync(param: ExtractApiDoAsyncRequest, options?: Configuration): Promise { + return this.api.doAsync(param.fileExtractRequest, options).toPromise(); } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status * @param param the request object */ - public extractByPath(param: ExtractApiExtractByPathRequest, options?: Configuration): Promise { - return this.api.extractByPath(param.path, options).toPromise(); + public getAsyncStatusWithHttpInfo(param: ExtractApiGetAsyncStatusRequest, options?: Configuration): Promise> { + return this.api.getAsyncStatusWithHttpInfo(param.taskId, options).toPromise(); + } + + /** + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param param the request object + */ + public getAsyncStatus(param: ExtractApiGetAsyncStatusRequest, options?: Configuration): Promise { + return this.api.getAsyncStatus(param.taskId, options).toPromise(); } } @@ -252,64 +279,6 @@ export class ObjectMetadataApi { } -import { ObservableSourceCodeExtractApi } from "./ObservableAPI"; -import { SourceCodeExtractApiRequestFactory, SourceCodeExtractApiResponseProcessor} from "../apis/SourceCodeExtractApi"; - -export interface SourceCodeExtractApiDoAsyncRequest { - /** - * - * @type FileExtractRequest - * @memberof SourceCodeExtractApidoAsync - */ - fileExtractRequest: FileExtractRequest -} - -export interface SourceCodeExtractApiGetAsyncStatusRequest { - /** - * - * @type number - * @memberof SourceCodeExtractApigetAsyncStatus - */ - taskId: number -} - -export class ObjectSourceCodeExtractApi { - private api: ObservableSourceCodeExtractApi - - public constructor(configuration: Configuration, requestFactory?: SourceCodeExtractApiRequestFactory, responseProcessor?: SourceCodeExtractApiResponseProcessor) { - this.api = new ObservableSourceCodeExtractApi(configuration, requestFactory, responseProcessor); - } - - /** - * @param param the request object - */ - public doAsyncWithHttpInfo(param: SourceCodeExtractApiDoAsyncRequest, options?: Configuration): Promise> { - return this.api.doAsyncWithHttpInfo(param.fileExtractRequest, options).toPromise(); - } - - /** - * @param param the request object - */ - public doAsync(param: SourceCodeExtractApiDoAsyncRequest, options?: Configuration): Promise { - return this.api.doAsync(param.fileExtractRequest, options).toPromise(); - } - - /** - * @param param the request object - */ - public getAsyncStatusWithHttpInfo(param: SourceCodeExtractApiGetAsyncStatusRequest, options?: Configuration): Promise> { - return this.api.getAsyncStatusWithHttpInfo(param.taskId, options).toPromise(); - } - - /** - * @param param the request object - */ - public getAsyncStatus(param: SourceCodeExtractApiGetAsyncStatusRequest, options?: Configuration): Promise { - return this.api.getAsyncStatus(param.taskId, options).toPromise(); - } - -} - import { ObservableValidationApi } from "./ObservableAPI"; import { ValidationApiRequestFactory, ValidationApiResponseProcessor} from "../apis/ValidationApi"; @@ -321,7 +290,7 @@ export interface ValidationApiDoValidateRequest { */ path: string /** - * The file to validate. + * * @type HttpFile * @memberof ValidationApidoValidate */ diff --git a/codegen/cms/source_code/types/ObservableAPI.ts b/codegen/cms/source_code/types/ObservableAPI.ts index 4844bcff4..b54d86bcc 100644 --- a/codegen/cms/source_code/types/ObservableAPI.ts +++ b/codegen/cms/source_code/types/ObservableAPI.ts @@ -63,7 +63,7 @@ export class ObservableContentApi { * Create a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createWithHttpInfo(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.create(environment, path, file, _options); @@ -89,7 +89,7 @@ export class ObservableContentApi { * Create a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public create(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable { return this.createWithHttpInfo(environment, path, file, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -100,7 +100,7 @@ export class ObservableContentApi { * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createOrUpdateWithHttpInfo(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.createOrUpdate(environment, path, file, _options); @@ -126,7 +126,7 @@ export class ObservableContentApi { * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable { return this.createOrUpdateWithHttpInfo(environment, path, file, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -186,12 +186,45 @@ export class ObservableExtractApi { } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file - * @param path The file system location of the zip file. + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param fileExtractRequest + */ + public doAsyncWithHttpInfo(fileExtractRequest: FileExtractRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.doAsync(fileExtractRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doAsyncWithHttpInfo(rsp))); + })); + } + + /** + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param fileExtractRequest + */ + public doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Observable { + return this.doAsyncWithHttpInfo(fileExtractRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param taskId The extraction task ID returned by the initial `extract/async` request. */ - public extractByPathWithHttpInfo(path: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.extractByPath(path, _options); + public getAsyncStatusWithHttpInfo(taskId: number, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getAsyncStatus(taskId, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -205,17 +238,17 @@ export class ObservableExtractApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.extractByPathWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAsyncStatusWithHttpInfo(rsp))); })); } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file - * @param path The file system location of the zip file. + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param taskId The extraction task ID returned by the initial `extract/async` request. */ - public extractByPath(path: string, _options?: Configuration): Observable { - return this.extractByPathWithHttpInfo(path, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getAsyncStatus(taskId: number, _options?: Configuration): Observable { + return this.getAsyncStatusWithHttpInfo(taskId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } @@ -275,82 +308,6 @@ export class ObservableMetadataApi { } -import { SourceCodeExtractApiRequestFactory, SourceCodeExtractApiResponseProcessor} from "../apis/SourceCodeExtractApi"; -export class ObservableSourceCodeExtractApi { - private requestFactory: SourceCodeExtractApiRequestFactory; - private responseProcessor: SourceCodeExtractApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: SourceCodeExtractApiRequestFactory, - responseProcessor?: SourceCodeExtractApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new SourceCodeExtractApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new SourceCodeExtractApiResponseProcessor(); - } - - /** - * @param fileExtractRequest - */ - public doAsyncWithHttpInfo(fileExtractRequest: FileExtractRequest, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.doAsync(fileExtractRequest, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doAsyncWithHttpInfo(rsp))); - })); - } - - /** - * @param fileExtractRequest - */ - public doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Observable { - return this.doAsyncWithHttpInfo(fileExtractRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * @param taskId - */ - public getAsyncStatusWithHttpInfo(taskId: number, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getAsyncStatus(taskId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAsyncStatusWithHttpInfo(rsp))); - })); - } - - /** - * @param taskId - */ - public getAsyncStatus(taskId: number, _options?: Configuration): Observable { - return this.getAsyncStatusWithHttpInfo(taskId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - import { ValidationApiRequestFactory, ValidationApiResponseProcessor} from "../apis/ValidationApi"; export class ObservableValidationApi { private requestFactory: ValidationApiRequestFactory; @@ -371,7 +328,7 @@ export class ObservableValidationApi { * Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type. * Validate the contents of a file * @param path The file system location of the file. - * @param file The file to validate. + * @param file */ public doValidateWithHttpInfo(path: string, file?: HttpFile, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.doValidate(path, file, _options); @@ -396,7 +353,7 @@ export class ObservableValidationApi { * Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type. * Validate the contents of a file * @param path The file system location of the file. - * @param file The file to validate. + * @param file */ public doValidate(path: string, file?: HttpFile, _options?: Configuration): Observable { return this.doValidateWithHttpInfo(path, file, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); diff --git a/codegen/cms/source_code/types/PromiseAPI.ts b/codegen/cms/source_code/types/PromiseAPI.ts index a4f18794b..4ab4b9ab8 100644 --- a/codegen/cms/source_code/types/PromiseAPI.ts +++ b/codegen/cms/source_code/types/PromiseAPI.ts @@ -46,7 +46,7 @@ export class PromiseContentApi { * Create a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createWithHttpInfo(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise> { const result = this.api.createWithHttpInfo(environment, path, file, _options); @@ -58,7 +58,7 @@ export class PromiseContentApi { * Create a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public create(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { const result = this.api.create(environment, path, file, _options); @@ -70,7 +70,7 @@ export class PromiseContentApi { * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createOrUpdateWithHttpInfo(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise> { const result = this.api.createOrUpdateWithHttpInfo(environment, path, file, _options); @@ -82,7 +82,7 @@ export class PromiseContentApi { * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. + * @param file */ public createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { const result = this.api.createOrUpdate(environment, path, file, _options); @@ -131,22 +131,42 @@ export class PromiseExtractApi { } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file - * @param path The file system location of the zip file. + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param fileExtractRequest */ - public extractByPathWithHttpInfo(path: string, _options?: Configuration): Promise> { - const result = this.api.extractByPathWithHttpInfo(path, _options); + public doAsyncWithHttpInfo(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise> { + const result = this.api.doAsyncWithHttpInfo(fileExtractRequest, _options); return result.toPromise(); } /** - * Extracts a zip file in the file system. The zip file will be extracted in-place and not be deleted automatically. - * Extracts a zip file - * @param path The file system location of the zip file. + * Extract a zip file in the developer file system. Extraction status can be checked with the `/extract/async/tasks/taskId/status` endpoint below. + * Extract a zip file + * @param fileExtractRequest */ - public extractByPath(path: string, _options?: Configuration): Promise { - const result = this.api.extractByPath(path, _options); + public doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise { + const result = this.api.doAsync(fileExtractRequest, _options); + return result.toPromise(); + } + + /** + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param taskId The extraction task ID returned by the initial `extract/async` request. + */ + public getAsyncStatusWithHttpInfo(taskId: number, _options?: Configuration): Promise> { + const result = this.api.getAsyncStatusWithHttpInfo(taskId, _options); + return result.toPromise(); + } + + /** + * Get the status of an extraction by the `taskId` returned from the initial `extract/async` request. + * Get extraction status + * @param taskId The extraction task ID returned by the initial `extract/async` request. + */ + public getAsyncStatus(taskId: number, _options?: Configuration): Promise { + const result = this.api.getAsyncStatus(taskId, _options); return result.toPromise(); } @@ -198,57 +218,6 @@ export class PromiseMetadataApi { -import { ObservableSourceCodeExtractApi } from './ObservableAPI'; - -import { SourceCodeExtractApiRequestFactory, SourceCodeExtractApiResponseProcessor} from "../apis/SourceCodeExtractApi"; -export class PromiseSourceCodeExtractApi { - private api: ObservableSourceCodeExtractApi - - public constructor( - configuration: Configuration, - requestFactory?: SourceCodeExtractApiRequestFactory, - responseProcessor?: SourceCodeExtractApiResponseProcessor - ) { - this.api = new ObservableSourceCodeExtractApi(configuration, requestFactory, responseProcessor); - } - - /** - * @param fileExtractRequest - */ - public doAsyncWithHttpInfo(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise> { - const result = this.api.doAsyncWithHttpInfo(fileExtractRequest, _options); - return result.toPromise(); - } - - /** - * @param fileExtractRequest - */ - public doAsync(fileExtractRequest: FileExtractRequest, _options?: Configuration): Promise { - const result = this.api.doAsync(fileExtractRequest, _options); - return result.toPromise(); - } - - /** - * @param taskId - */ - public getAsyncStatusWithHttpInfo(taskId: number, _options?: Configuration): Promise> { - const result = this.api.getAsyncStatusWithHttpInfo(taskId, _options); - return result.toPromise(); - } - - /** - * @param taskId - */ - public getAsyncStatus(taskId: number, _options?: Configuration): Promise { - const result = this.api.getAsyncStatus(taskId, _options); - return result.toPromise(); - } - - -} - - - import { ObservableValidationApi } from './ObservableAPI'; import { ValidationApiRequestFactory, ValidationApiResponseProcessor} from "../apis/ValidationApi"; @@ -267,7 +236,7 @@ export class PromiseValidationApi { * Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type. * Validate the contents of a file * @param path The file system location of the file. - * @param file The file to validate. + * @param file */ public doValidateWithHttpInfo(path: string, file?: HttpFile, _options?: Configuration): Promise> { const result = this.api.doValidateWithHttpInfo(path, file, _options); @@ -278,7 +247,7 @@ export class PromiseValidationApi { * Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type. * Validate the contents of a file * @param path The file system location of the file. - * @param file The file to validate. + * @param file */ public doValidate(path: string, file?: HttpFile, _options?: Configuration): Promise { const result = this.api.doValidate(path, file, _options); From 724718914ee2afb942798dc409f05cca9ba044d7 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Sep 2024 15:40:29 +0300 Subject: [PATCH 04/46] Update CMS Discoveries --- src/discovery/cms/source_code/SourceCodeDiscovery.ts | 5 ----- test/spec/cms/sourceCode/sourceCode.spec.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/src/discovery/cms/source_code/SourceCodeDiscovery.ts b/src/discovery/cms/source_code/SourceCodeDiscovery.ts index a5f014530..0d74962bb 100644 --- a/src/discovery/cms/source_code/SourceCodeDiscovery.ts +++ b/src/discovery/cms/source_code/SourceCodeDiscovery.ts @@ -6,7 +6,6 @@ import { RequestContext, ResponseContext, ServerConfiguration, - SourceCodeExtractApi, ValidationApi, } from '../../../../codegen/cms/source_code/index' import { Observable } from '../../../../codegen/cms/source_code/rxjsStub' @@ -18,7 +17,6 @@ export default class SourceCodeDiscovery { public contentApi: ContentApi public extractApi: ExtractApi public metadataApi: MetadataApi - public sourceCodeExtractApi: SourceCodeExtractApi public validationApi: ValidationApi constructor(config: IConfiguration) { @@ -35,9 +33,6 @@ export default class SourceCodeDiscovery { this.contentApi = ApiDecoratorService.getInstance().apply(new ContentApi(configuration)) this.extractApi = ApiDecoratorService.getInstance().apply(new ExtractApi(configuration)) this.metadataApi = ApiDecoratorService.getInstance().apply(new MetadataApi(configuration)) - this.sourceCodeExtractApi = ApiDecoratorService.getInstance().apply( - new SourceCodeExtractApi(configuration), - ) this.validationApi = ApiDecoratorService.getInstance().apply(new ValidationApi(configuration)) } } diff --git a/test/spec/cms/sourceCode/sourceCode.spec.ts b/test/spec/cms/sourceCode/sourceCode.spec.ts index ca665784c..3b77ca81a 100644 --- a/test/spec/cms/sourceCode/sourceCode.spec.ts +++ b/test/spec/cms/sourceCode/sourceCode.spec.ts @@ -6,7 +6,6 @@ describe('api client', () => { expect(client.hasOwnProperty('contentApi')).toBeTruthy() expect(client.hasOwnProperty('extractApi')).toBeTruthy() expect(client.hasOwnProperty('metadataApi')).toBeTruthy() - expect(client.hasOwnProperty('sourceCodeExtractApi')).toBeTruthy() expect(client.hasOwnProperty('validationApi')).toBeTruthy() }) }) From 1dbcaf8003ad064f1024c9404417bfc8a12f0f2c Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Sep 2024 18:16:43 +0300 Subject: [PATCH 05/46] Codegen: CRM Lists --- codegen/crm/lists/apis/FoldersApi.ts | 495 ++++++++++++++++++ codegen/crm/lists/apis/ListsApi.ts | 16 +- codegen/crm/lists/apis/MappingApi.ts | 180 +++++++ codegen/crm/lists/apis/MembershipsApi.ts | 220 +++++++- codegen/crm/lists/index.ts | 2 +- ...iCollectionResponseJoinTimeAndRecordId.ts} | 26 +- ...ionResponseRecordListMembershipNoPaging.ts | 42 ++ codegen/crm/lists/models/ErrorDetail.ts | 2 +- .../crm/lists/models/JoinTimeAndRecordId.ts | 41 ++ codegen/crm/lists/models/ListCreateRequest.ts | 17 +- .../crm/lists/models/ListCreateResponse.ts | 5 +- codegen/crm/lists/models/ListFetchResponse.ts | 5 +- .../lists/models/ListFilterUpdateRequest.ts | 5 +- .../lists/models/ListFolderCreateRequest.ts | 47 ++ .../lists/models/ListFolderCreateResponse.ts | 35 ++ .../lists/models/ListFolderFetchResponse.ts | 35 ++ codegen/crm/lists/models/ListMoveRequest.ts | 47 ++ codegen/crm/lists/models/ListSearchRequest.ts | 36 +- .../crm/lists/models/ListSearchResponse.ts | 5 +- .../crm/lists/models/ListUpdateResponse.ts | 5 +- codegen/crm/lists/models/ListsByIdResponse.ts | 5 +- .../lists/models/MembershipChangeRequest.ts | 17 +- .../lists/models/MembershipsUpdateResponse.ts | 23 +- codegen/crm/lists/models/ModelError.ts | 2 +- codegen/crm/lists/models/NextPage.ts | 5 +- codegen/crm/lists/models/ObjectSerializer.ts | 74 ++- codegen/crm/lists/models/Paging.ts | 5 +- codegen/crm/lists/models/PreviousPage.ts | 5 +- ...licAbsoluteComparativeTimestampRefineBy.ts | 16 +- .../PublicAbsoluteRangedTimestampRefineBy.ts | 26 +- .../crm/lists/models/PublicAdsSearchFilter.ts | 30 +- .../crm/lists/models/PublicAdsTimeFilter.ts | 18 +- .../lists/models/PublicAllHistoryRefineBy.ts | 2 +- .../models/PublicAllPropertyTypesOperation.ts | 16 +- .../crm/lists/models/PublicAndFilterBranch.ts | 16 +- .../models/PublicAssociationFilterBranch.ts | 28 +- .../models/PublicAssociationInListFilter.ts | 52 +- .../models/PublicBatchMigrationMapping.ts | 45 ++ .../models/PublicBoolPropertyOperation.ts | 28 +- .../PublicCalendarDatePropertyOperation.ts | 56 +- .../models/PublicCampaignInfluencedFilter.ts | 16 +- .../PublicCommunicationSubscriptionFilter.ts | 32 +- .../PublicComparativeDatePropertyOperation.ts | 28 +- ...blicComparativePropertyUpdatedOperation.ts | 28 +- .../crm/lists/models/PublicConstantFilter.ts | 16 +- .../lists/models/PublicCtaAnalyticsFilter.ts | 32 +- codegen/crm/lists/models/PublicDatePoint.ts | 68 +-- .../models/PublicDatePropertyOperation.ts | 36 +- .../models/PublicDateTimePropertyOperation.ts | 30 +- .../lists/models/PublicEmailEventFilter.ts | 50 +- .../models/PublicEmailSubscriptionFilter.ts | 28 +- .../PublicEnumerationPropertyOperation.ts | 30 +- .../models/PublicEventAnalyticsFilter.ts | 30 +- .../lists/models/PublicEventFilterMetadata.ts | 8 +- .../models/PublicFiscalQuarterReference.ts | 42 +- .../lists/models/PublicFiscalYearReference.ts | 42 +- .../models/PublicFormSubmissionFilter.ts | 30 +- ...FormSubmissionFilterCoalescingRefineBy.ts} | 100 ++-- .../PublicFormSubmissionOnPageFilter.ts | 42 +- .../crm/lists/models/PublicInListFilter.ts | 22 +- .../models/PublicInListFilterMetadata.ts | 2 +- codegen/crm/lists/models/PublicIndexOffset.ts | 50 +- .../lists/models/PublicIndexedTimePoint.ts | 32 +- .../PublicIndexedTimePointIndexReference.ts | 30 +- .../models/PublicIntegrationEventFilter.ts | 16 +- codegen/crm/lists/models/PublicListFolder.ts | 114 ++++ .../lists/models/PublicMigrationMapping.ts | 47 ++ .../crm/lists/models/PublicMonthReference.ts | 36 +- .../PublicMultiStringPropertyOperation.ts | 30 +- .../lists/models/PublicNotAllFilterBranch.ts | 16 +- .../lists/models/PublicNotAnyFilterBranch.ts | 16 +- .../crm/lists/models/PublicNowReference.ts | 30 +- .../models/PublicNumAssociationsFilter.ts | 20 +- .../models/PublicNumOccurrencesRefineBy.ts | 16 +- .../models/PublicNumberPropertyOperation.ts | 30 +- codegen/crm/lists/models/PublicObjectList.ts | 30 +- .../models/PublicObjectListSearchResult.ts | 20 +- .../crm/lists/models/PublicOrFilterBranch.ts | 16 +- .../models/PublicPageViewAnalyticsFilter.ts | 40 +- .../models/PublicPrivacyAnalyticsFilter.ts | 16 +- .../PublicPropertyAssociationFilterBranch.ts | 34 +- ...ociationFilterBranchFilterBranchesInner.ts | 22 +- ...ertyAssociationFilterBranchFiltersInner.ts | 162 +++--- .../PublicPropertyAssociationInListFilter.ts | 36 +- .../crm/lists/models/PublicPropertyFilter.ts | 22 +- .../models/PublicPropertyReferencedTime.ts | 26 +- .../lists/models/PublicQuarterReference.ts | 42 +- .../PublicRangedDatePropertyOperation.ts | 38 +- .../PublicRangedNumberPropertyOperation.ts | 30 +- .../lists/models/PublicRangedTimeOperation.ts | 60 +-- ...licRelativeComparativeTimestampRefineBy.ts | 16 +- .../PublicRelativeRangedTimestampRefineBy.ts | 22 +- .../models/PublicRestrictedFilterBranch.ts | 16 +- ...PublicRollingDateRangePropertyOperation.ts | 32 +- .../PublicRollingPropertyUpdatedOperation.ts | 30 +- .../models/PublicSetOccurrencesRefineBy.ts | 2 +- .../models/PublicStringPropertyOperation.ts | 26 +- .../lists/models/PublicSurveyMonkeyFilter.ts | 16 +- .../models/PublicSurveyMonkeyValueFilter.ts | 26 +- ...SurveyMonkeyValueFilterValueComparison.ts} | 110 ++-- codegen/crm/lists/models/PublicTimeOffset.ts | 16 +- .../lists/models/PublicTimePointOperation.ts | 44 +- .../PublicTimePointOperationTimePoint.ts | 78 +-- .../crm/lists/models/PublicTodayReference.ts | 30 +- .../lists/models/PublicUnifiedEventsFilter.ts | 36 +- .../models/PublicUnifiedEventsFilterBranch.ts | 32 +- .../models/PublicUnifiedEventsInListFilter.ts | 68 --- .../crm/lists/models/PublicWebinarFilter.ts | 16 +- .../crm/lists/models/PublicWeekReference.ts | 44 +- .../crm/lists/models/PublicYearReference.ts | 42 +- .../crm/lists/models/RecordListMembership.ts | 55 ++ codegen/crm/lists/models/all.ts | 17 +- codegen/crm/lists/types/ObjectParamAPI.ts | 419 +++++++++++++-- codegen/crm/lists/types/ObservableAPI.ts | 461 ++++++++++++++-- codegen/crm/lists/types/PromiseAPI.ts | 331 ++++++++++-- 115 files changed, 3918 insertions(+), 1591 deletions(-) create mode 100644 codegen/crm/lists/apis/FoldersApi.ts create mode 100644 codegen/crm/lists/apis/MappingApi.ts rename codegen/crm/lists/models/{CollectionResponseLong.ts => ApiCollectionResponseJoinTimeAndRecordId.ts} (58%) create mode 100644 codegen/crm/lists/models/ApiCollectionResponseRecordListMembershipNoPaging.ts create mode 100644 codegen/crm/lists/models/JoinTimeAndRecordId.ts create mode 100644 codegen/crm/lists/models/ListFolderCreateRequest.ts create mode 100644 codegen/crm/lists/models/ListFolderCreateResponse.ts create mode 100644 codegen/crm/lists/models/ListFolderFetchResponse.ts create mode 100644 codegen/crm/lists/models/ListMoveRequest.ts create mode 100644 codegen/crm/lists/models/PublicBatchMigrationMapping.ts rename codegen/crm/lists/models/{PublicEventAnalyticsFilterCoalescingRefineBy.ts => PublicFormSubmissionFilterCoalescingRefineBy.ts} (95%) create mode 100644 codegen/crm/lists/models/PublicListFolder.ts create mode 100644 codegen/crm/lists/models/PublicMigrationMapping.ts rename codegen/crm/lists/models/{PublicPropertyFilterOperation.ts => PublicSurveyMonkeyValueFilterValueComparison.ts} (92%) delete mode 100644 codegen/crm/lists/models/PublicUnifiedEventsInListFilter.ts create mode 100644 codegen/crm/lists/models/RecordListMembership.ts diff --git a/codegen/crm/lists/apis/FoldersApi.ts b/codegen/crm/lists/apis/FoldersApi.ts new file mode 100644 index 000000000..4c17cf7e9 --- /dev/null +++ b/codegen/crm/lists/apis/FoldersApi.ts @@ -0,0 +1,495 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import { isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ListFolderCreateRequest } from '../models/ListFolderCreateRequest'; +import { ListFolderCreateResponse } from '../models/ListFolderCreateResponse'; +import { ListFolderFetchResponse } from '../models/ListFolderFetchResponse'; +import { ListMoveRequest } from '../models/ListMoveRequest'; + +/** + * no description + */ +export class FoldersApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Creates a folder with the given information. + * Creates a folder + * @param listFolderCreateRequest + */ + public async create(listFolderCreateRequest: ListFolderCreateRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'listFolderCreateRequest' is not null or undefined + if (listFolderCreateRequest === null || listFolderCreateRequest === undefined) { + throw new RequiredError("FoldersApi", "create", "listFolderCreateRequest"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/folders'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(listFolderCreateRequest, "ListFolderCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param folderId The Id of the folder to retrieve. + */ + public async getAll(folderId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + // Path Params + const localVarPath = '/crm/v3/lists/folders'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (folderId !== undefined) { + requestContext.setQueryParam("folderId", ObjectSerializer.serialize(folderId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param folderId + * @param newParentFolderId + */ + public async move(folderId: string, newParentFolderId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'folderId' is not null or undefined + if (folderId === null || folderId === undefined) { + throw new RequiredError("FoldersApi", "move", "folderId"); + } + + + // verify required parameter 'newParentFolderId' is not null or undefined + if (newParentFolderId === null || newParentFolderId === undefined) { + throw new RequiredError("FoldersApi", "move", "newParentFolderId"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/folders/{folderId}/move/{newParentFolderId}' + .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))) + .replace('{' + 'newParentFolderId' + '}', encodeURIComponent(String(newParentFolderId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param listMoveRequest + */ + public async moveList(listMoveRequest: ListMoveRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'listMoveRequest' is not null or undefined + if (listMoveRequest === null || listMoveRequest === undefined) { + throw new RequiredError("FoldersApi", "moveList", "listMoveRequest"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/folders/move-list'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(listMoveRequest, "ListMoveRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param folderId + */ + public async remove(folderId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'folderId' is not null or undefined + if (folderId === null || folderId === undefined) { + throw new RequiredError("FoldersApi", "remove", "folderId"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/folders/{folderId}' + .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param folderId + * @param newFolderName + */ + public async rename(folderId: string, newFolderName?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'folderId' is not null or undefined + if (folderId === null || folderId === undefined) { + throw new RequiredError("FoldersApi", "rename", "folderId"); + } + + + + // Path Params + const localVarPath = '/crm/v3/lists/folders/{folderId}/rename' + .replace('{' + 'folderId' + '}', encodeURIComponent(String(folderId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (newFolderName !== undefined) { + requestContext.setQueryParam("newFolderName", ObjectSerializer.serialize(newFolderName, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class FoldersApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to create + * @throws ApiException if the response code was not in [200, 299] + */ + public async createWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListFolderCreateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderCreateResponse", "" + ) as ListFolderCreateResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListFolderCreateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderCreateResponse", "" + ) as ListFolderCreateResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getAll + * @throws ApiException if the response code was not in [200, 299] + */ + public async getAllWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to move + * @throws ApiException if the response code was not in [200, 299] + */ + public async moveWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to moveList + * @throws ApiException if the response code was not in [200, 299] + */ + public async moveListWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to remove + * @throws ApiException if the response code was not in [200, 299] + */ + public async removeWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to rename + * @throws ApiException if the response code was not in [200, 299] + */ + public async renameWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListFolderFetchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFolderFetchResponse", "" + ) as ListFolderFetchResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/codegen/crm/lists/apis/ListsApi.ts b/codegen/crm/lists/apis/ListsApi.ts index 7d7e2f497..818c2a773 100644 --- a/codegen/crm/lists/apis/ListsApi.ts +++ b/codegen/crm/lists/apis/ListsApi.ts @@ -73,7 +73,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { /** * Search lists by list name or page through all lists by providing an empty `query` value. * Search Lists - * @param listSearchRequest The IDs of the records to add and/or remove from the list. + * @param listSearchRequest */ public async doSearch(listSearchRequest: ListSearchRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -124,7 +124,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * @param listIds The **ILS IDs** of the lists to fetch. * @param includeFilters A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public async getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise { + public async getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -138,7 +138,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { // Query Params if (listIds !== undefined) { - requestContext.setQueryParam("listIds", ObjectSerializer.serialize(listIds, "Array", "int32")); + requestContext.setQueryParam("listIds", ObjectSerializer.serialize(listIds, "Array", "")); } // Query Params @@ -168,7 +168,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * @param listId The **ILS ID** of the list to fetch. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public async getById(listId: number, includeFilters?: boolean, _options?: Configuration): Promise { + public async getById(listId: string, includeFilters?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -265,7 +265,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * Delete a List * @param listId The **ILS ID** of the list to delete. */ - public async remove(listId: number, _options?: Configuration): Promise { + public async remove(listId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -303,7 +303,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * Restore a List * @param listId The **ILS ID** of the list to restore. */ - public async restore(listId: number, _options?: Configuration): Promise { + public async restore(listId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -343,7 +343,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * @param listFilterUpdateRequest * @param enrollObjectsInWorkflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. */ - public async updateListFilters(listId: number, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise { + public async updateListFilters(listId: string, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -406,7 +406,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory { * @param listName The name to update the list to. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public async updateName(listId: number, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise { + public async updateName(listId: string, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined diff --git a/codegen/crm/lists/apis/MappingApi.ts b/codegen/crm/lists/apis/MappingApi.ts new file mode 100644 index 000000000..64a34d0b2 --- /dev/null +++ b/codegen/crm/lists/apis/MappingApi.ts @@ -0,0 +1,180 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import { isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { PublicBatchMigrationMapping } from '../models/PublicBatchMigrationMapping'; +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; + +/** + * no description + */ +export class MappingApiRequestFactory extends BaseAPIRequestFactory { + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param legacyListId The legacy list id from lists v1 API. + */ + public async translateLegacyListIdToListId(legacyListId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + // Path Params + const localVarPath = '/crm/v3/lists/idmapping'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (legacyListId !== undefined) { + requestContext.setQueryParam("legacyListId", ObjectSerializer.serialize(legacyListId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param requestBody + */ + public async translateLegacyListIdToListIdBatch(requestBody: Array, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'requestBody' is not null or undefined + if (requestBody === null || requestBody === undefined) { + throw new RequiredError("MappingApi", "translateLegacyListIdToListIdBatch", "requestBody"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/idmapping'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(requestBody, "Array", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class MappingApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to translateLegacyListIdToListId + * @throws ApiException if the response code was not in [200, 299] + */ + public async translateLegacyListIdToListIdWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PublicMigrationMapping = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PublicMigrationMapping", "" + ) as PublicMigrationMapping; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PublicMigrationMapping = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PublicMigrationMapping", "" + ) as PublicMigrationMapping; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to translateLegacyListIdToListIdBatch + * @throws ApiException if the response code was not in [200, 299] + */ + public async translateLegacyListIdToListIdBatchWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PublicBatchMigrationMapping = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PublicBatchMigrationMapping", "" + ) as PublicBatchMigrationMapping; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PublicBatchMigrationMapping = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PublicBatchMigrationMapping", "" + ) as PublicBatchMigrationMapping; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/codegen/crm/lists/apis/MembershipsApi.ts b/codegen/crm/lists/apis/MembershipsApi.ts index 90002b07e..e54eda0e5 100644 --- a/codegen/crm/lists/apis/MembershipsApi.ts +++ b/codegen/crm/lists/apis/MembershipsApi.ts @@ -8,7 +8,8 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { CollectionResponseLong } from '../models/CollectionResponseLong'; +import { ApiCollectionResponseJoinTimeAndRecordId } from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +import { ApiCollectionResponseRecordListMembershipNoPaging } from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; import { MembershipChangeRequest } from '../models/MembershipChangeRequest'; import { MembershipsUpdateResponse } from '../models/MembershipsUpdateResponse'; @@ -21,9 +22,9 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { * Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add Records to a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to add to the list. + * @param requestBody */ - public async add(listId: number, requestBody: Array, _options?: Configuration): Promise { + public async add(listId: string, requestBody: Array, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -53,7 +54,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(requestBody, "Array", ""), + ObjectSerializer.serialize(requestBody, "Array", ""), contentType ); requestContext.setBody(serializedBody); @@ -74,12 +75,12 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. * @param sourceListId The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. */ - public async addAllFromList(listId: number, sourceListId: number, _options?: Configuration): Promise { + public async addAllFromList(listId: string, sourceListId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -123,9 +124,9 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { * Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add and/or Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param membershipChangeRequest The IDs of the records to add and/or remove from the list. + * @param membershipChangeRequest */ - public async addAndRemove(listId: number, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise { + public async addAndRemove(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -175,6 +176,52 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param objectTypeId Object type id of the record + * @param recordId Id of the record + */ + public async getLists(objectTypeId: string, recordId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'objectTypeId' is not null or undefined + if (objectTypeId === null || objectTypeId === undefined) { + throw new RequiredError("MembershipsApi", "getLists", "objectTypeId"); + } + + + // verify required parameter 'recordId' is not null or undefined + if (recordId === null || recordId === undefined) { + throw new RequiredError("MembershipsApi", "getLists", "recordId"); + } + + + // Path Params + const localVarPath = '/crm/v3/lists/records/{objectTypeId}/{recordId}/memberships' + .replace('{' + 'objectTypeId' + '}', encodeURIComponent(String(objectTypeId))) + .replace('{' + 'recordId' + '}', encodeURIComponent(String(recordId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Fetch the memberships of a list in order sorted by the `recordId` of the records in the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. * Fetch List Memberships Ordered by ID @@ -183,7 +230,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. * @param limit The number of records to return in the response. The maximum `limit` is 250. */ - public async getPage(listId: number, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { + public async getPage(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -234,13 +281,72 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param listId The **ILS ID** of the list. + * @param after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @param limit The number of records to return in the response. The maximum `limit` is 250. + */ + public async getPageOrderedByAddedToListDate(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'listId' is not null or undefined + if (listId === null || listId === undefined) { + throw new RequiredError("MembershipsApi", "getPageOrderedByAddedToListDate", "listId"); + } + + + + + + // Path Params + const localVarPath = '/crm/v3/lists/{listId}/memberships/join-order' + .replace('{' + 'listId' + '}', encodeURIComponent(String(listId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (after !== undefined) { + requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", "")); + } + + // Query Params + if (before !== undefined) { + requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", "")); + } + + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to remove from the list. + * @param requestBody */ - public async remove(listId: number, requestBody: Array, _options?: Configuration): Promise { + public async remove(listId: string, requestBody: Array, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -270,7 +376,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(requestBody, "Array", ""), + ObjectSerializer.serialize(requestBody, "Array", ""), contentType ); requestContext.setBody(serializedBody); @@ -291,11 +397,11 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. */ - public async removeAll(listId: number, _options?: Configuration): Promise { + public async removeAll(listId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'listId' is not null or undefined @@ -436,6 +542,42 @@ export class MembershipsApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getLists + * @throws ApiException if the response code was not in [200, 299] + */ + public async getListsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ApiCollectionResponseRecordListMembershipNoPaging = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiCollectionResponseRecordListMembershipNoPaging", "" + ) as ApiCollectionResponseRecordListMembershipNoPaging; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ApiCollectionResponseRecordListMembershipNoPaging = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiCollectionResponseRecordListMembershipNoPaging", "" + ) as ApiCollectionResponseRecordListMembershipNoPaging; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -443,13 +585,49 @@ export class MembershipsApiResponseProcessor { * @params response Response returned by the server for a request to getPage * @throws ApiException if the response code was not in [200, 299] */ - public async getPageWithHttpInfo(response: ResponseContext): Promise> { + public async getPageWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ApiCollectionResponseJoinTimeAndRecordId = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiCollectionResponseJoinTimeAndRecordId", "" + ) as ApiCollectionResponseJoinTimeAndRecordId; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ApiCollectionResponseJoinTimeAndRecordId = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ApiCollectionResponseJoinTimeAndRecordId", "" + ) as ApiCollectionResponseJoinTimeAndRecordId; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getPageOrderedByAddedToListDate + * @throws ApiException if the response code was not in [200, 299] + */ + public async getPageOrderedByAddedToListDateWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseLong = ObjectSerializer.deserialize( + const body: ApiCollectionResponseJoinTimeAndRecordId = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseLong", "" - ) as CollectionResponseLong; + "ApiCollectionResponseJoinTimeAndRecordId", "" + ) as ApiCollectionResponseJoinTimeAndRecordId; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("0", response.httpStatusCode)) { @@ -462,10 +640,10 @@ export class MembershipsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseLong = ObjectSerializer.deserialize( + const body: ApiCollectionResponseJoinTimeAndRecordId = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseLong", "" - ) as CollectionResponseLong; + "ApiCollectionResponseJoinTimeAndRecordId", "" + ) as ApiCollectionResponseJoinTimeAndRecordId; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } diff --git a/codegen/crm/lists/index.ts b/codegen/crm/lists/index.ts index 881ab5576..6f110222e 100644 --- a/codegen/crm/lists/index.ts +++ b/codegen/crm/lists/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseListsApi as ListsApi, PromiseMembershipsApi as MembershipsApi } from './types/PromiseAPI'; +export { PromiseFoldersApi as FoldersApi, PromiseListsApi as ListsApi, PromiseMappingApi as MappingApi, PromiseMembershipsApi as MembershipsApi } from './types/PromiseAPI'; diff --git a/codegen/crm/lists/models/CollectionResponseLong.ts b/codegen/crm/lists/models/ApiCollectionResponseJoinTimeAndRecordId.ts similarity index 58% rename from codegen/crm/lists/models/CollectionResponseLong.ts rename to codegen/crm/lists/models/ApiCollectionResponseJoinTimeAndRecordId.ts index 775d9dfdf..71e7f50fe 100644 --- a/codegen/crm/lists/models/CollectionResponseLong.ts +++ b/codegen/crm/lists/models/ApiCollectionResponseJoinTimeAndRecordId.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,21 +10,23 @@ * Do not edit the class manually. */ +import { JoinTimeAndRecordId } from '../models/JoinTimeAndRecordId'; import { Paging } from '../models/Paging'; -/** -* The results and paging cursor for a membership fetch request. -*/ -export class CollectionResponseLong { +export class ApiCollectionResponseJoinTimeAndRecordId { + 'total'?: number; 'paging'?: Paging; - /** - * The record IDs for the requested page of memberships. - */ - 'results': Array; + 'results': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int64" + }, { "name": "paging", "baseName": "paging", @@ -34,12 +36,12 @@ export class CollectionResponseLong { { "name": "results", "baseName": "results", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { - return CollectionResponseLong.attributeTypeMap; + return ApiCollectionResponseJoinTimeAndRecordId.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/lists/models/ApiCollectionResponseRecordListMembershipNoPaging.ts b/codegen/crm/lists/models/ApiCollectionResponseRecordListMembershipNoPaging.ts new file mode 100644 index 000000000..5c88c8dbe --- /dev/null +++ b/codegen/crm/lists/models/ApiCollectionResponseRecordListMembershipNoPaging.ts @@ -0,0 +1,42 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RecordListMembership } from '../models/RecordListMembership'; + +export class ApiCollectionResponseRecordListMembershipNoPaging { + 'total'?: number; + 'results': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int64" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ApiCollectionResponseRecordListMembershipNoPaging.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ErrorDetail.ts b/codegen/crm/lists/models/ErrorDetail.ts index ea9f81999..e8a63cfae 100644 --- a/codegen/crm/lists/models/ErrorDetail.ts +++ b/codegen/crm/lists/models/ErrorDetail.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/lists/models/JoinTimeAndRecordId.ts b/codegen/crm/lists/models/JoinTimeAndRecordId.ts new file mode 100644 index 000000000..b3bb4727c --- /dev/null +++ b/codegen/crm/lists/models/JoinTimeAndRecordId.ts @@ -0,0 +1,41 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class JoinTimeAndRecordId { + 'recordId': string; + 'membershipTimestamp': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "recordId", + "baseName": "recordId", + "type": "string", + "format": "" + }, + { + "name": "membershipTimestamp", + "baseName": "membershipTimestamp", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return JoinTimeAndRecordId.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ListCreateRequest.ts b/codegen/crm/lists/models/ListCreateRequest.ts index 4b126f4fb..b4aca9cb4 100644 --- a/codegen/crm/lists/models/ListCreateRequest.ts +++ b/codegen/crm/lists/models/ListCreateRequest.ts @@ -1,9 +1,9 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,9 +12,6 @@ import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; -/** -* The request object used when creating a new object list. -*/ export class ListCreateRequest { /** * The object type ID of the type of objects that the list will store. @@ -25,6 +22,10 @@ export class ListCreateRequest { */ 'processingType': string; /** + * The list of custom properties to tie to the list. Custom property name is the key, the value is the value. + */ + 'customProperties'?: { [key: string]: string; }; + /** * The ID of the folder that the list should be created in. If left blank, then the list will be created in the root of the list folder structure. */ 'listFolderId'?: number; @@ -49,6 +50,12 @@ export class ListCreateRequest { "type": "string", "format": "" }, + { + "name": "customProperties", + "baseName": "customProperties", + "type": "{ [key: string]: string; }", + "format": "" + }, { "name": "listFolderId", "baseName": "listFolderId", diff --git a/codegen/crm/lists/models/ListCreateResponse.ts b/codegen/crm/lists/models/ListCreateResponse.ts index 55f23d36f..8cdfef526 100644 --- a/codegen/crm/lists/models/ListCreateResponse.ts +++ b/codegen/crm/lists/models/ListCreateResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicObjectList } from '../models/PublicObjectList'; -/** -* The response for a list create request. -*/ export class ListCreateResponse { 'list': PublicObjectList; diff --git a/codegen/crm/lists/models/ListFetchResponse.ts b/codegen/crm/lists/models/ListFetchResponse.ts index 0bde6b683..45da6c363 100644 --- a/codegen/crm/lists/models/ListFetchResponse.ts +++ b/codegen/crm/lists/models/ListFetchResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicObjectList } from '../models/PublicObjectList'; -/** -* The response for a list fetch request. -*/ export class ListFetchResponse { 'list': PublicObjectList; diff --git a/codegen/crm/lists/models/ListFilterUpdateRequest.ts b/codegen/crm/lists/models/ListFilterUpdateRequest.ts index f0385cf48..f00473d7b 100644 --- a/codegen/crm/lists/models/ListFilterUpdateRequest.ts +++ b/codegen/crm/lists/models/ListFilterUpdateRequest.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; -/** -* The definition of the list filter branch update request. -*/ export class ListFilterUpdateRequest { 'filterBranch': PublicPropertyAssociationFilterBranchFilterBranchesInner; diff --git a/codegen/crm/lists/models/ListFolderCreateRequest.ts b/codegen/crm/lists/models/ListFolderCreateRequest.ts new file mode 100644 index 000000000..1b5186e7d --- /dev/null +++ b/codegen/crm/lists/models/ListFolderCreateRequest.ts @@ -0,0 +1,47 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class ListFolderCreateRequest { + /** + * The folder this should be created in, if not specified will be created in the root folder 0. + */ + 'parentFolderId'?: string; + /** + * The name of the folder to be created. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "parentFolderId", + "baseName": "parentFolderId", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListFolderCreateRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ListFolderCreateResponse.ts b/codegen/crm/lists/models/ListFolderCreateResponse.ts new file mode 100644 index 000000000..cafc8916f --- /dev/null +++ b/codegen/crm/lists/models/ListFolderCreateResponse.ts @@ -0,0 +1,35 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PublicListFolder } from '../models/PublicListFolder'; + +export class ListFolderCreateResponse { + 'folder': PublicListFolder; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "folder", + "baseName": "folder", + "type": "PublicListFolder", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListFolderCreateResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ListFolderFetchResponse.ts b/codegen/crm/lists/models/ListFolderFetchResponse.ts new file mode 100644 index 000000000..3375302b8 --- /dev/null +++ b/codegen/crm/lists/models/ListFolderFetchResponse.ts @@ -0,0 +1,35 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PublicListFolder } from '../models/PublicListFolder'; + +export class ListFolderFetchResponse { + 'folder': PublicListFolder; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "folder", + "baseName": "folder", + "type": "PublicListFolder", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListFolderFetchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ListMoveRequest.ts b/codegen/crm/lists/models/ListMoveRequest.ts new file mode 100644 index 000000000..5c8c2b0db --- /dev/null +++ b/codegen/crm/lists/models/ListMoveRequest.ts @@ -0,0 +1,47 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class ListMoveRequest { + /** + * The Id of the list to move. + */ + 'listId': string; + /** + * The Id of folder to move the list to, the root folder is Id 0. + */ + 'newFolderId': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "listId", + "baseName": "listId", + "type": "string", + "format": "" + }, + { + "name": "newFolderId", + "baseName": "newFolderId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListMoveRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/ListSearchRequest.ts b/codegen/crm/lists/models/ListSearchRequest.ts index dd752c251..fcf916745 100644 --- a/codegen/crm/lists/models/ListSearchRequest.ts +++ b/codegen/crm/lists/models/ListSearchRequest.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,14 +11,15 @@ */ -/** -* The request object used for searching through lists. -*/ export class ListSearchRequest { + /** + * The `listIds` that will be used to filter results by `listId`. If values are provided, then the response will only include results that have a `listId` in this array. If no value is provided, or if an empty list is provided, then the results will not be filtered by `listId`. + */ + 'listIds'?: Array; /** * Value used to paginate through lists. The `offset` provided in the response can be used in the next request to fetch the next page of results. Defaults to `0` if no offset is provided. */ - 'offset': number; + 'offset'?: number; /** * The `query` that will be used to search for lists by list name. If no `query` is provided, then the results will include all lists. */ @@ -28,13 +29,24 @@ export class ListSearchRequest { */ 'count'?: number; /** + * The `processingTypes` that will be used to filter results by `processingType`. If values are provided, then the response will only include results that have a `processingType` in this array. If no value is provided, or if an empty list is provided, then results will not be filtered by `processingType`. Valid `processingTypes` are: `MANUAL`, `SNAPSHOT`, or `DYNAMIC`. + */ + 'processingTypes'?: Array; + /** * The property names of any additional list properties to include in the response. Properties that do not exist or that are empty for a particular list are not included in the response. By default, all requests will fetch the following properties for each list: `hs_list_size`, `hs_last_record_added_at`, `hs_last_record_removed_at`, `hs_folder_name`, and `hs_list_reference_count`. */ - 'additionalProperties': Array; + 'additionalProperties'?: Array; + 'sort'?: string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "listIds", + "baseName": "listIds", + "type": "Array", + "format": "" + }, { "name": "offset", "baseName": "offset", @@ -53,11 +65,23 @@ export class ListSearchRequest { "type": "number", "format": "int32" }, + { + "name": "processingTypes", + "baseName": "processingTypes", + "type": "Array", + "format": "" + }, { "name": "additionalProperties", "baseName": "additionalProperties", "type": "Array", "format": "" + }, + { + "name": "sort", + "baseName": "sort", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/ListSearchResponse.ts b/codegen/crm/lists/models/ListSearchResponse.ts index 6f4f20795..95373cf24 100644 --- a/codegen/crm/lists/models/ListSearchResponse.ts +++ b/codegen/crm/lists/models/ListSearchResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicObjectListSearchResult } from '../models/PublicObjectListSearchResult'; -/** -* The response object with the list search hits and additional information regarding pagination. -*/ export class ListSearchResponse { /** * The total number of lists that match the search criteria. diff --git a/codegen/crm/lists/models/ListUpdateResponse.ts b/codegen/crm/lists/models/ListUpdateResponse.ts index 399b65244..18b1d4659 100644 --- a/codegen/crm/lists/models/ListUpdateResponse.ts +++ b/codegen/crm/lists/models/ListUpdateResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicObjectList } from '../models/PublicObjectList'; -/** -* The updated definition of the list in response to a list update request. -*/ export class ListUpdateResponse { 'updatedList'?: PublicObjectList; diff --git a/codegen/crm/lists/models/ListsByIdResponse.ts b/codegen/crm/lists/models/ListsByIdResponse.ts index 6d57c1b4f..9e7d1c1b1 100644 --- a/codegen/crm/lists/models/ListsByIdResponse.ts +++ b/codegen/crm/lists/models/ListsByIdResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicObjectList } from '../models/PublicObjectList'; -/** -* The response object containing the lists found for a multi-list fetch. -*/ export class ListsByIdResponse { /** * The object list definitions. diff --git a/codegen/crm/lists/models/MembershipChangeRequest.ts b/codegen/crm/lists/models/MembershipChangeRequest.ts index d206cf1b4..43856f380 100644 --- a/codegen/crm/lists/models/MembershipChangeRequest.ts +++ b/codegen/crm/lists/models/MembershipChangeRequest.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,18 +11,15 @@ */ -/** -* The IDs of the records to add and/or remove from a list. -*/ export class MembershipChangeRequest { /** * */ - 'recordIdsToRemove': Array; + 'recordIdsToRemove': Array; /** * */ - 'recordIdsToAdd': Array; + 'recordIdsToAdd': Array; static readonly discriminator: string | undefined = undefined; @@ -30,14 +27,14 @@ export class MembershipChangeRequest { { "name": "recordIdsToRemove", "baseName": "recordIdsToRemove", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { "name": "recordIdsToAdd", "baseName": "recordIdsToAdd", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/MembershipsUpdateResponse.ts b/codegen/crm/lists/models/MembershipsUpdateResponse.ts index b9f77a906..fdff99d4e 100644 --- a/codegen/crm/lists/models/MembershipsUpdateResponse.ts +++ b/codegen/crm/lists/models/MembershipsUpdateResponse.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,19 +11,16 @@ */ -/** -* The IDs of the records that were `added`, `removed`, and/or found to be `missing` as a result of the membership update request. -*/ export class MembershipsUpdateResponse { /** * The IDs of the records that were `removed` from the list. */ - 'recordIdsRemoved': Array; - 'recordsIdsAdded': Array; + 'recordIdsRemoved': Array; + 'recordsIdsAdded': Array; /** * The IDs of the records that were `missing` (e.g. did not exist in the portal) and so were not `added` or `removed`. */ - 'recordIdsMissing': Array; + 'recordIdsMissing': Array; static readonly discriminator: string | undefined = undefined; @@ -31,20 +28,20 @@ export class MembershipsUpdateResponse { { "name": "recordIdsRemoved", "baseName": "recordIdsRemoved", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { "name": "recordsIdsAdded", "baseName": "recordsIdsAdded", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { "name": "recordIdsMissing", "baseName": "recordIdsMissing", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/ModelError.ts b/codegen/crm/lists/models/ModelError.ts index 21a66d094..4746f9d69 100644 --- a/codegen/crm/lists/models/ModelError.ts +++ b/codegen/crm/lists/models/ModelError.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/lists/models/NextPage.ts b/codegen/crm/lists/models/NextPage.ts index 6f896fe64..f38080e31 100644 --- a/codegen/crm/lists/models/NextPage.ts +++ b/codegen/crm/lists/models/NextPage.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* The cursor for the next page of records. -*/ export class NextPage { /** * A direct link to the request for the next page of records. diff --git a/codegen/crm/lists/models/ObjectSerializer.ts b/codegen/crm/lists/models/ObjectSerializer.ts index 2fd8f534e..fc338a871 100644 --- a/codegen/crm/lists/models/ObjectSerializer.ts +++ b/codegen/crm/lists/models/ObjectSerializer.ts @@ -1,9 +1,15 @@ -export * from '../models/CollectionResponseLong'; +export * from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +export * from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; export * from '../models/ErrorDetail'; +export * from '../models/JoinTimeAndRecordId'; export * from '../models/ListCreateRequest'; export * from '../models/ListCreateResponse'; export * from '../models/ListFetchResponse'; export * from '../models/ListFilterUpdateRequest'; +export * from '../models/ListFolderCreateRequest'; +export * from '../models/ListFolderCreateResponse'; +export * from '../models/ListFolderFetchResponse'; +export * from '../models/ListMoveRequest'; export * from '../models/ListSearchRequest'; export * from '../models/ListSearchResponse'; export * from '../models/ListUpdateResponse'; @@ -23,6 +29,7 @@ export * from '../models/PublicAllPropertyTypesOperation'; export * from '../models/PublicAndFilterBranch'; export * from '../models/PublicAssociationFilterBranch'; export * from '../models/PublicAssociationInListFilter'; +export * from '../models/PublicBatchMigrationMapping'; export * from '../models/PublicBoolPropertyOperation'; export * from '../models/PublicCalendarDatePropertyOperation'; export * from '../models/PublicCampaignInfluencedFilter'; @@ -38,11 +45,11 @@ export * from '../models/PublicEmailEventFilter'; export * from '../models/PublicEmailSubscriptionFilter'; export * from '../models/PublicEnumerationPropertyOperation'; export * from '../models/PublicEventAnalyticsFilter'; -export * from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; export * from '../models/PublicEventFilterMetadata'; export * from '../models/PublicFiscalQuarterReference'; export * from '../models/PublicFiscalYearReference'; export * from '../models/PublicFormSubmissionFilter'; +export * from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export * from '../models/PublicFormSubmissionOnPageFilter'; export * from '../models/PublicInListFilter'; export * from '../models/PublicInListFilterMetadata'; @@ -50,6 +57,8 @@ export * from '../models/PublicIndexOffset'; export * from '../models/PublicIndexedTimePoint'; export * from '../models/PublicIndexedTimePointIndexReference'; export * from '../models/PublicIntegrationEventFilter'; +export * from '../models/PublicListFolder'; +export * from '../models/PublicMigrationMapping'; export * from '../models/PublicMonthReference'; export * from '../models/PublicMultiStringPropertyOperation'; export * from '../models/PublicNotAllFilterBranch'; @@ -68,7 +77,6 @@ export * from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInne export * from '../models/PublicPropertyAssociationFilterBranchFiltersInner'; export * from '../models/PublicPropertyAssociationInListFilter'; export * from '../models/PublicPropertyFilter'; -export * from '../models/PublicPropertyFilterOperation'; export * from '../models/PublicPropertyReferencedTime'; export * from '../models/PublicQuarterReference'; export * from '../models/PublicRangedDatePropertyOperation'; @@ -83,23 +91,30 @@ export * from '../models/PublicSetOccurrencesRefineBy'; export * from '../models/PublicStringPropertyOperation'; export * from '../models/PublicSurveyMonkeyFilter'; export * from '../models/PublicSurveyMonkeyValueFilter'; +export * from '../models/PublicSurveyMonkeyValueFilterValueComparison'; export * from '../models/PublicTimeOffset'; export * from '../models/PublicTimePointOperation'; export * from '../models/PublicTimePointOperationTimePoint'; export * from '../models/PublicTodayReference'; export * from '../models/PublicUnifiedEventsFilter'; export * from '../models/PublicUnifiedEventsFilterBranch'; -export * from '../models/PublicUnifiedEventsInListFilter'; export * from '../models/PublicWebinarFilter'; export * from '../models/PublicWeekReference'; export * from '../models/PublicYearReference'; +export * from '../models/RecordListMembership'; -import { CollectionResponseLong } from '../models/CollectionResponseLong'; +import { ApiCollectionResponseJoinTimeAndRecordId } from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +import { ApiCollectionResponseRecordListMembershipNoPaging } from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; import { ErrorDetail } from '../models/ErrorDetail'; +import { JoinTimeAndRecordId } from '../models/JoinTimeAndRecordId'; import { ListCreateRequest } from '../models/ListCreateRequest'; import { ListCreateResponse } from '../models/ListCreateResponse'; import { ListFetchResponse } from '../models/ListFetchResponse'; import { ListFilterUpdateRequest } from '../models/ListFilterUpdateRequest'; +import { ListFolderCreateRequest } from '../models/ListFolderCreateRequest'; +import { ListFolderCreateResponse } from '../models/ListFolderCreateResponse'; +import { ListFolderFetchResponse } from '../models/ListFolderFetchResponse'; +import { ListMoveRequest } from '../models/ListMoveRequest'; import { ListSearchRequest } from '../models/ListSearchRequest'; import { ListSearchResponse } from '../models/ListSearchResponse'; import { ListUpdateResponse } from '../models/ListUpdateResponse'; @@ -119,8 +134,9 @@ import { PublicAllPropertyTypesOperation } from '../models/PublicAllProperty import { PublicAndFilterBranch } from '../models/PublicAndFilterBranch'; import { PublicAssociationFilterBranch } from '../models/PublicAssociationFilterBranch'; import { PublicAssociationInListFilter } from '../models/PublicAssociationInListFilter'; +import { PublicBatchMigrationMapping } from '../models/PublicBatchMigrationMapping'; import { PublicBoolPropertyOperation } from '../models/PublicBoolPropertyOperation'; -import { PublicCalendarDatePropertyOperation } from '../models/PublicCalendarDatePropertyOperation'; +import { PublicCalendarDatePropertyOperation } from '../models/PublicCalendarDatePropertyOperation'; import { PublicCampaignInfluencedFilter } from '../models/PublicCampaignInfluencedFilter'; import { PublicCommunicationSubscriptionFilter } from '../models/PublicCommunicationSubscriptionFilter'; import { PublicComparativeDatePropertyOperation } from '../models/PublicComparativeDatePropertyOperation'; @@ -130,22 +146,24 @@ import { PublicCtaAnalyticsFilter } from '../models/PublicCtaAnalyticsFilt import { PublicDatePoint } from '../models/PublicDatePoint'; import { PublicDatePropertyOperation } from '../models/PublicDatePropertyOperation'; import { PublicDateTimePropertyOperation } from '../models/PublicDateTimePropertyOperation'; -import { PublicEmailEventFilter } from '../models/PublicEmailEventFilter'; +import { PublicEmailEventFilter } from '../models/PublicEmailEventFilter'; import { PublicEmailSubscriptionFilter } from '../models/PublicEmailSubscriptionFilter'; import { PublicEnumerationPropertyOperation } from '../models/PublicEnumerationPropertyOperation'; import { PublicEventAnalyticsFilter } from '../models/PublicEventAnalyticsFilter'; -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; import { PublicEventFilterMetadata } from '../models/PublicEventFilterMetadata'; import { PublicFiscalQuarterReference } from '../models/PublicFiscalQuarterReference'; import { PublicFiscalYearReference } from '../models/PublicFiscalYearReference'; -import { PublicFormSubmissionFilter } from '../models/PublicFormSubmissionFilter'; -import { PublicFormSubmissionOnPageFilter } from '../models/PublicFormSubmissionOnPageFilter'; +import { PublicFormSubmissionFilter } from '../models/PublicFormSubmissionFilter'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; +import { PublicFormSubmissionOnPageFilter } from '../models/PublicFormSubmissionOnPageFilter'; import { PublicInListFilter } from '../models/PublicInListFilter'; import { PublicInListFilterMetadata } from '../models/PublicInListFilterMetadata'; import { PublicIndexOffset } from '../models/PublicIndexOffset'; import { PublicIndexedTimePoint } from '../models/PublicIndexedTimePoint'; -import { PublicIndexedTimePointIndexReference } from '../models/PublicIndexedTimePointIndexReference'; +import { PublicIndexedTimePointIndexReference } from '../models/PublicIndexedTimePointIndexReference'; import { PublicIntegrationEventFilter } from '../models/PublicIntegrationEventFilter'; +import { PublicListFolder } from '../models/PublicListFolder'; +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; import { PublicMonthReference } from '../models/PublicMonthReference'; import { PublicMultiStringPropertyOperation } from '../models/PublicMultiStringPropertyOperation'; import { PublicNotAllFilterBranch } from '../models/PublicNotAllFilterBranch'; @@ -160,11 +178,10 @@ import { PublicOrFilterBranch } from '../models/PublicOrFilterBranch'; import { PublicPageViewAnalyticsFilter } from '../models/PublicPageViewAnalyticsFilter'; import { PublicPrivacyAnalyticsFilter } from '../models/PublicPrivacyAnalyticsFilter'; import { PublicPropertyAssociationFilterBranch } from '../models/PublicPropertyAssociationFilterBranch'; -import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; +import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/PublicPropertyAssociationFilterBranchFiltersInner'; import { PublicPropertyAssociationInListFilter } from '../models/PublicPropertyAssociationInListFilter'; import { PublicPropertyFilter } from '../models/PublicPropertyFilter'; -import { PublicPropertyFilterOperation } from '../models/PublicPropertyFilterOperation'; import { PublicPropertyReferencedTime } from '../models/PublicPropertyReferencedTime'; import { PublicQuarterReference } from '../models/PublicQuarterReference'; import { PublicRangedDatePropertyOperation } from '../models/PublicRangedDatePropertyOperation'; @@ -179,16 +196,17 @@ import { PublicSetOccurrencesRefineBy } from '../models/PublicSetOccurrencesR import { PublicStringPropertyOperation } from '../models/PublicStringPropertyOperation'; import { PublicSurveyMonkeyFilter } from '../models/PublicSurveyMonkeyFilter'; import { PublicSurveyMonkeyValueFilter } from '../models/PublicSurveyMonkeyValueFilter'; +import { PublicSurveyMonkeyValueFilterValueComparison } from '../models/PublicSurveyMonkeyValueFilterValueComparison'; import { PublicTimeOffset } from '../models/PublicTimeOffset'; import { PublicTimePointOperation } from '../models/PublicTimePointOperation'; import { PublicTimePointOperationTimePoint } from '../models/PublicTimePointOperationTimePoint'; import { PublicTodayReference } from '../models/PublicTodayReference'; import { PublicUnifiedEventsFilter } from '../models/PublicUnifiedEventsFilter'; -import { PublicUnifiedEventsFilterBranch } from '../models/PublicUnifiedEventsFilterBranch'; -import { PublicUnifiedEventsInListFilter } from '../models/PublicUnifiedEventsInListFilter'; +import { PublicUnifiedEventsFilterBranch } from '../models/PublicUnifiedEventsFilterBranch'; import { PublicWebinarFilter } from '../models/PublicWebinarFilter'; -import { PublicWeekReference } from '../models/PublicWeekReference'; +import { PublicWeekReference } from '../models/PublicWeekReference'; import { PublicYearReference } from '../models/PublicYearReference'; +import { RecordListMembership } from '../models/RecordListMembership'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -213,8 +231,8 @@ let enumsMap: Set = new Set([ "PublicAssociationFilterBranchFilterBranchTypeEnum", "PublicAssociationInListFilterFilterTypeEnum", "PublicBoolPropertyOperationOperationTypeEnum", - "PublicCalendarDatePropertyOperationOperationTypeEnum", "PublicCalendarDatePropertyOperationFiscalYearStartEnum", + "PublicCalendarDatePropertyOperationOperationTypeEnum", "PublicCampaignInfluencedFilterFilterTypeEnum", "PublicCommunicationSubscriptionFilterFilterTypeEnum", "PublicComparativeDatePropertyOperationOperationTypeEnum", @@ -256,7 +274,6 @@ let enumsMap: Set = new Set([ "PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum", "PublicPropertyAssociationInListFilterFilterTypeEnum", "PublicPropertyFilterFilterTypeEnum", - "PublicPropertyFilterOperationFiscalYearStartEnum", "PublicPropertyReferencedTimeTimeTypeEnum", "PublicQuarterReferenceReferenceTypeEnum", "PublicRangedDatePropertyOperationOperationTypeEnum", @@ -271,26 +288,32 @@ let enumsMap: Set = new Set([ "PublicStringPropertyOperationOperationTypeEnum", "PublicSurveyMonkeyFilterFilterTypeEnum", "PublicSurveyMonkeyValueFilterFilterTypeEnum", + "PublicSurveyMonkeyValueFilterValueComparisonFiscalYearStartEnum", "PublicTimePointOperationOperationTypeEnum", "PublicTimePointOperationTimePointTimeTypeEnum", "PublicTodayReferenceReferenceTypeEnum", "PublicUnifiedEventsFilterFilterTypeEnum", "PublicUnifiedEventsFilterBranchFilterBranchTypeEnum", "PublicUnifiedEventsFilterBranchOperatorEnum", - "PublicUnifiedEventsInListFilterFilterTypeEnum", "PublicWebinarFilterFilterTypeEnum", - "PublicWeekReferenceReferenceTypeEnum", "PublicWeekReferenceDayOfWeekEnum", + "PublicWeekReferenceReferenceTypeEnum", "PublicYearReferenceReferenceTypeEnum", ]); let typeMap: {[index: string]: any} = { - "CollectionResponseLong": CollectionResponseLong, + "ApiCollectionResponseJoinTimeAndRecordId": ApiCollectionResponseJoinTimeAndRecordId, + "ApiCollectionResponseRecordListMembershipNoPaging": ApiCollectionResponseRecordListMembershipNoPaging, "ErrorDetail": ErrorDetail, + "JoinTimeAndRecordId": JoinTimeAndRecordId, "ListCreateRequest": ListCreateRequest, "ListCreateResponse": ListCreateResponse, "ListFetchResponse": ListFetchResponse, "ListFilterUpdateRequest": ListFilterUpdateRequest, + "ListFolderCreateRequest": ListFolderCreateRequest, + "ListFolderCreateResponse": ListFolderCreateResponse, + "ListFolderFetchResponse": ListFolderFetchResponse, + "ListMoveRequest": ListMoveRequest, "ListSearchRequest": ListSearchRequest, "ListSearchResponse": ListSearchResponse, "ListUpdateResponse": ListUpdateResponse, @@ -310,6 +333,7 @@ let typeMap: {[index: string]: any} = { "PublicAndFilterBranch": PublicAndFilterBranch, "PublicAssociationFilterBranch": PublicAssociationFilterBranch, "PublicAssociationInListFilter": PublicAssociationInListFilter, + "PublicBatchMigrationMapping": PublicBatchMigrationMapping, "PublicBoolPropertyOperation": PublicBoolPropertyOperation, "PublicCalendarDatePropertyOperation": PublicCalendarDatePropertyOperation, "PublicCampaignInfluencedFilter": PublicCampaignInfluencedFilter, @@ -325,11 +349,11 @@ let typeMap: {[index: string]: any} = { "PublicEmailSubscriptionFilter": PublicEmailSubscriptionFilter, "PublicEnumerationPropertyOperation": PublicEnumerationPropertyOperation, "PublicEventAnalyticsFilter": PublicEventAnalyticsFilter, - "PublicEventAnalyticsFilterCoalescingRefineBy": PublicEventAnalyticsFilterCoalescingRefineBy, "PublicEventFilterMetadata": PublicEventFilterMetadata, "PublicFiscalQuarterReference": PublicFiscalQuarterReference, "PublicFiscalYearReference": PublicFiscalYearReference, "PublicFormSubmissionFilter": PublicFormSubmissionFilter, + "PublicFormSubmissionFilterCoalescingRefineBy": PublicFormSubmissionFilterCoalescingRefineBy, "PublicFormSubmissionOnPageFilter": PublicFormSubmissionOnPageFilter, "PublicInListFilter": PublicInListFilter, "PublicInListFilterMetadata": PublicInListFilterMetadata, @@ -337,6 +361,8 @@ let typeMap: {[index: string]: any} = { "PublicIndexedTimePoint": PublicIndexedTimePoint, "PublicIndexedTimePointIndexReference": PublicIndexedTimePointIndexReference, "PublicIntegrationEventFilter": PublicIntegrationEventFilter, + "PublicListFolder": PublicListFolder, + "PublicMigrationMapping": PublicMigrationMapping, "PublicMonthReference": PublicMonthReference, "PublicMultiStringPropertyOperation": PublicMultiStringPropertyOperation, "PublicNotAllFilterBranch": PublicNotAllFilterBranch, @@ -355,7 +381,6 @@ let typeMap: {[index: string]: any} = { "PublicPropertyAssociationFilterBranchFiltersInner": PublicPropertyAssociationFilterBranchFiltersInner, "PublicPropertyAssociationInListFilter": PublicPropertyAssociationInListFilter, "PublicPropertyFilter": PublicPropertyFilter, - "PublicPropertyFilterOperation": PublicPropertyFilterOperation, "PublicPropertyReferencedTime": PublicPropertyReferencedTime, "PublicQuarterReference": PublicQuarterReference, "PublicRangedDatePropertyOperation": PublicRangedDatePropertyOperation, @@ -370,16 +395,17 @@ let typeMap: {[index: string]: any} = { "PublicStringPropertyOperation": PublicStringPropertyOperation, "PublicSurveyMonkeyFilter": PublicSurveyMonkeyFilter, "PublicSurveyMonkeyValueFilter": PublicSurveyMonkeyValueFilter, + "PublicSurveyMonkeyValueFilterValueComparison": PublicSurveyMonkeyValueFilterValueComparison, "PublicTimeOffset": PublicTimeOffset, "PublicTimePointOperation": PublicTimePointOperation, "PublicTimePointOperationTimePoint": PublicTimePointOperationTimePoint, "PublicTodayReference": PublicTodayReference, "PublicUnifiedEventsFilter": PublicUnifiedEventsFilter, "PublicUnifiedEventsFilterBranch": PublicUnifiedEventsFilterBranch, - "PublicUnifiedEventsInListFilter": PublicUnifiedEventsInListFilter, "PublicWebinarFilter": PublicWebinarFilter, "PublicWeekReference": PublicWeekReference, "PublicYearReference": PublicYearReference, + "RecordListMembership": RecordListMembership, } type MimeTypeDescriptor = { diff --git a/codegen/crm/lists/models/Paging.ts b/codegen/crm/lists/models/Paging.ts index 86c1b5417..52afbe3ea 100644 --- a/codegen/crm/lists/models/Paging.ts +++ b/codegen/crm/lists/models/Paging.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,9 +13,6 @@ import { NextPage } from '../models/NextPage'; import { PreviousPage } from '../models/PreviousPage'; -/** -* The cursor to be used for paging through records. -*/ export class Paging { 'next'?: NextPage; 'prev'?: PreviousPage; diff --git a/codegen/crm/lists/models/PreviousPage.ts b/codegen/crm/lists/models/PreviousPage.ts index 3d7e8c7b9..527470b0b 100644 --- a/codegen/crm/lists/models/PreviousPage.ts +++ b/codegen/crm/lists/models/PreviousPage.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* The cursor for the previous page of records. -*/ export class PreviousPage { /** * The offset of the previous page of records. diff --git a/codegen/crm/lists/models/PublicAbsoluteComparativeTimestampRefineBy.ts b/codegen/crm/lists/models/PublicAbsoluteComparativeTimestampRefineBy.ts index 21c948011..9e49c4587 100644 --- a/codegen/crm/lists/models/PublicAbsoluteComparativeTimestampRefineBy.ts +++ b/codegen/crm/lists/models/PublicAbsoluteComparativeTimestampRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,25 +12,25 @@ export class PublicAbsoluteComparativeTimestampRefineBy { - 'type': PublicAbsoluteComparativeTimestampRefineByTypeEnum; 'comparison': string; + 'type': PublicAbsoluteComparativeTimestampRefineByTypeEnum; 'timestamp': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "PublicAbsoluteComparativeTimestampRefineByTypeEnum", - "format": "" - }, { "name": "comparison", "baseName": "comparison", "type": "string", "format": "" }, + { + "name": "type", + "baseName": "type", + "type": "PublicAbsoluteComparativeTimestampRefineByTypeEnum", + "format": "" + }, { "name": "timestamp", "baseName": "timestamp", diff --git a/codegen/crm/lists/models/PublicAbsoluteRangedTimestampRefineBy.ts b/codegen/crm/lists/models/PublicAbsoluteRangedTimestampRefineBy.ts index 79ac070b4..32ac30e9d 100644 --- a/codegen/crm/lists/models/PublicAbsoluteRangedTimestampRefineBy.ts +++ b/codegen/crm/lists/models/PublicAbsoluteRangedTimestampRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,20 +12,14 @@ export class PublicAbsoluteRangedTimestampRefineBy { - 'type': PublicAbsoluteRangedTimestampRefineByTypeEnum; 'rangeType': string; - 'lowerTimestamp': number; 'upperTimestamp': number; + 'lowerTimestamp': number; + 'type': PublicAbsoluteRangedTimestampRefineByTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "PublicAbsoluteRangedTimestampRefineByTypeEnum", - "format": "" - }, { "name": "rangeType", "baseName": "rangeType", @@ -33,16 +27,22 @@ export class PublicAbsoluteRangedTimestampRefineBy { "format": "" }, { - "name": "lowerTimestamp", - "baseName": "lowerTimestamp", + "name": "upperTimestamp", + "baseName": "upperTimestamp", "type": "number", "format": "int64" }, { - "name": "upperTimestamp", - "baseName": "upperTimestamp", + "name": "lowerTimestamp", + "baseName": "lowerTimestamp", "type": "number", "format": "int64" + }, + { + "name": "type", + "baseName": "type", + "type": "PublicAbsoluteRangedTimestampRefineByTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicAdsSearchFilter.ts b/codegen/crm/lists/models/PublicAdsSearchFilter.ts index fabe7b71c..04d489391 100644 --- a/codegen/crm/lists/models/PublicAdsSearchFilter.ts +++ b/codegen/crm/lists/models/PublicAdsSearchFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,20 +12,20 @@ export class PublicAdsSearchFilter { - 'filterType': PublicAdsSearchFilterFilterTypeEnum; - 'entityType': string; - 'searchTermType': string; 'searchTerms': Array; + 'entityType': string; 'adNetwork': string; + 'searchTermType': string; + 'filterType': PublicAdsSearchFilterFilterTypeEnum; 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicAdsSearchFilterFilterTypeEnum", + "name": "searchTerms", + "baseName": "searchTerms", + "type": "Array", "format": "" }, { @@ -35,21 +35,21 @@ export class PublicAdsSearchFilter { "format": "" }, { - "name": "searchTermType", - "baseName": "searchTermType", + "name": "adNetwork", + "baseName": "adNetwork", "type": "string", "format": "" }, { - "name": "searchTerms", - "baseName": "searchTerms", - "type": "Array", + "name": "searchTermType", + "baseName": "searchTermType", + "type": "string", "format": "" }, { - "name": "adNetwork", - "baseName": "adNetwork", - "type": "string", + "name": "filterType", + "baseName": "filterType", + "type": "PublicAdsSearchFilterFilterTypeEnum", "format": "" }, { diff --git a/codegen/crm/lists/models/PublicAdsTimeFilter.ts b/codegen/crm/lists/models/PublicAdsTimeFilter.ts index 12aff2574..c08a5b909 100644 --- a/codegen/crm/lists/models/PublicAdsTimeFilter.ts +++ b/codegen/crm/lists/models/PublicAdsTimeFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,25 +10,25 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicAdsTimeFilter { + 'pruningRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; 'filterType': PublicAdsTimeFilterFilterTypeEnum; - 'pruningRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicAdsTimeFilterFilterTypeEnum", + "name": "pruningRefineBy", + "baseName": "pruningRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "filterType", + "baseName": "filterType", + "type": "PublicAdsTimeFilterFilterTypeEnum", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicAllHistoryRefineBy.ts b/codegen/crm/lists/models/PublicAllHistoryRefineBy.ts index 5e1e0b6cc..6ac5760d3 100644 --- a/codegen/crm/lists/models/PublicAllHistoryRefineBy.ts +++ b/codegen/crm/lists/models/PublicAllHistoryRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/lists/models/PublicAllPropertyTypesOperation.ts b/codegen/crm/lists/models/PublicAllPropertyTypesOperation.ts index 56a86b996..d547aa291 100644 --- a/codegen/crm/lists/models/PublicAllPropertyTypesOperation.ts +++ b/codegen/crm/lists/models/PublicAllPropertyTypesOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,13 +12,19 @@ export class PublicAllPropertyTypesOperation { + 'includeObjectsWithNoValueSet': boolean; 'operationType': PublicAllPropertyTypesOperationOperationTypeEnum; 'operator': string; - 'includeObjectsWithNoValueSet': boolean; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", + "format": "" + }, { "name": "operationType", "baseName": "operationType", @@ -30,12 +36,6 @@ export class PublicAllPropertyTypesOperation { "baseName": "operator", "type": "string", "format": "" - }, - { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicAndFilterBranch.ts b/codegen/crm/lists/models/PublicAndFilterBranch.ts index 9fe87c086..f4101a4c4 100644 --- a/codegen/crm/lists/models/PublicAndFilterBranch.ts +++ b/codegen/crm/lists/models/PublicAndFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -16,8 +16,8 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicAndFilterBranch { 'filterBranchType': PublicAndFilterBranchFilterBranchTypeEnum; 'filterBranches': Array; - 'filters': Array; 'filterBranchOperator': string; + 'filters': Array; static readonly discriminator: string | undefined = undefined; @@ -34,17 +34,17 @@ export class PublicAndFilterBranch { "type": "Array", "format": "" }, - { - "name": "filters", - "baseName": "filters", - "type": "Array", - "format": "" - }, { "name": "filterBranchOperator", "baseName": "filterBranchOperator", "type": "string", "format": "" + }, + { + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicAssociationFilterBranch.ts b/codegen/crm/lists/models/PublicAssociationFilterBranch.ts index 8343ce3c7..112a9629c 100644 --- a/codegen/crm/lists/models/PublicAssociationFilterBranch.ts +++ b/codegen/crm/lists/models/PublicAssociationFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -16,12 +16,12 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicAssociationFilterBranch { 'filterBranchType': PublicAssociationFilterBranchFilterBranchTypeEnum; 'filterBranches': Array; - 'filters': Array; 'objectTypeId': string; - 'operator': string; + 'filterBranchOperator': string; 'associationTypeId': number; 'associationCategory': string; - 'filterBranchOperator': string; + 'filters': Array; + 'operator': string; static readonly discriminator: string | undefined = undefined; @@ -38,12 +38,6 @@ export class PublicAssociationFilterBranch { "type": "Array", "format": "" }, - { - "name": "filters", - "baseName": "filters", - "type": "Array", - "format": "" - }, { "name": "objectTypeId", "baseName": "objectTypeId", @@ -51,8 +45,8 @@ export class PublicAssociationFilterBranch { "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", "type": "string", "format": "" }, @@ -69,8 +63,14 @@ export class PublicAssociationFilterBranch { "format": "" }, { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicAssociationInListFilter.ts b/codegen/crm/lists/models/PublicAssociationInListFilter.ts index 389a4d8d6..4e843d6c8 100644 --- a/codegen/crm/lists/models/PublicAssociationInListFilter.ts +++ b/codegen/crm/lists/models/PublicAssociationInListFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,66 +10,66 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicAssociationInListFilter { - 'filterType': PublicAssociationInListFilterFilterTypeEnum; - 'coalescingRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': string; - 'listId': number; - 'toObjectTypeId'?: string; + 'listId': string; + 'coalescingRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; + 'toObjectType'?: string; 'associationTypeId': number; 'associationCategory': string; - 'toObjectType'?: string; + 'filterType': PublicAssociationInListFilterFilterTypeEnum; + 'toObjectTypeId'?: string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicAssociationInListFilterFilterTypeEnum", + "name": "listId", + "baseName": "listId", + "type": "string", "format": "" }, { "name": "coalescingRefineBy", "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "toObjectType", + "baseName": "toObjectType", "type": "string", "format": "" }, { - "name": "listId", - "baseName": "listId", + "name": "associationTypeId", + "baseName": "associationTypeId", "type": "number", "format": "int32" }, { - "name": "toObjectTypeId", - "baseName": "toObjectTypeId", + "name": "associationCategory", + "baseName": "associationCategory", "type": "string", "format": "" }, { - "name": "associationTypeId", - "baseName": "associationTypeId", - "type": "number", - "format": "int32" + "name": "filterType", + "baseName": "filterType", + "type": "PublicAssociationInListFilterFilterTypeEnum", + "format": "" }, { - "name": "associationCategory", - "baseName": "associationCategory", + "name": "toObjectTypeId", + "baseName": "toObjectTypeId", "type": "string", "format": "" }, { - "name": "toObjectType", - "baseName": "toObjectType", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicBatchMigrationMapping.ts b/codegen/crm/lists/models/PublicBatchMigrationMapping.ts new file mode 100644 index 000000000..b409f75dc --- /dev/null +++ b/codegen/crm/lists/models/PublicBatchMigrationMapping.ts @@ -0,0 +1,45 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; + +export class PublicBatchMigrationMapping { + 'legacyListIdsToIdsMapping': Array; + /** + * A list of legacy list ids that were passed in but not found. It will be empty if no id\'s are missing + */ + 'missingLegacyListIds': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "legacyListIdsToIdsMapping", + "baseName": "legacyListIdsToIdsMapping", + "type": "Array", + "format": "" + }, + { + "name": "missingLegacyListIds", + "baseName": "missingLegacyListIds", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PublicBatchMigrationMapping.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/PublicBoolPropertyOperation.ts b/codegen/crm/lists/models/PublicBoolPropertyOperation.ts index e624dd46b..b6e045490 100644 --- a/codegen/crm/lists/models/PublicBoolPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicBoolPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,36 +12,36 @@ export class PublicBoolPropertyOperation { - 'operationType': PublicBoolPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; + 'operationType': PublicBoolPropertyOperationOperationTypeEnum; 'value': boolean; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicBoolPropertyOperationOperationTypeEnum", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "string", + "name": "operationType", + "baseName": "operationType", + "type": "PublicBoolPropertyOperationOperationTypeEnum", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", + "name": "value", + "baseName": "value", "type": "boolean", "format": "" }, { - "name": "value", - "baseName": "value", - "type": "boolean", + "name": "operator", + "baseName": "operator", + "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicCalendarDatePropertyOperation.ts b/codegen/crm/lists/models/PublicCalendarDatePropertyOperation.ts index ac84010fe..1a3774b7a 100644 --- a/codegen/crm/lists/models/PublicCalendarDatePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicCalendarDatePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,27 +12,27 @@ export class PublicCalendarDatePropertyOperation { + 'useFiscalYear'?: boolean; + 'fiscalYearStart'?: PublicCalendarDatePropertyOperationFiscalYearStartEnum; + 'includeObjectsWithNoValueSet': boolean; 'operationType': PublicCalendarDatePropertyOperationOperationTypeEnum; + 'timeUnitCount'?: number; 'operator': string; - 'includeObjectsWithNoValueSet': boolean; 'timeUnit': string; - 'fiscalYearStart'?: PublicCalendarDatePropertyOperationFiscalYearStartEnum; - 'useFiscalYear'?: boolean; - 'timeUnitCount'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicCalendarDatePropertyOperationOperationTypeEnum", + "name": "useFiscalYear", + "baseName": "useFiscalYear", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "string", + "name": "fiscalYearStart", + "baseName": "fiscalYearStart", + "type": "PublicCalendarDatePropertyOperationFiscalYearStartEnum", "format": "" }, { @@ -42,28 +42,28 @@ export class PublicCalendarDatePropertyOperation { "format": "" }, { - "name": "timeUnit", - "baseName": "timeUnit", - "type": "string", + "name": "operationType", + "baseName": "operationType", + "type": "PublicCalendarDatePropertyOperationOperationTypeEnum", "format": "" }, { - "name": "fiscalYearStart", - "baseName": "fiscalYearStart", - "type": "PublicCalendarDatePropertyOperationFiscalYearStartEnum", - "format": "" + "name": "timeUnitCount", + "baseName": "timeUnitCount", + "type": "number", + "format": "int32" }, { - "name": "useFiscalYear", - "baseName": "useFiscalYear", - "type": "boolean", + "name": "operator", + "baseName": "operator", + "type": "string", "format": "" }, { - "name": "timeUnitCount", - "baseName": "timeUnitCount", - "type": "number", - "format": "int32" + "name": "timeUnit", + "baseName": "timeUnit", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { @@ -75,9 +75,6 @@ export class PublicCalendarDatePropertyOperation { } -export enum PublicCalendarDatePropertyOperationOperationTypeEnum { - CalendarDate = 'CALENDAR_DATE' -} export enum PublicCalendarDatePropertyOperationFiscalYearStartEnum { January = 'JANUARY', February = 'FEBRUARY', @@ -92,4 +89,7 @@ export enum PublicCalendarDatePropertyOperationFiscalYearStartEnum { November = 'NOVEMBER', December = 'DECEMBER' } +export enum PublicCalendarDatePropertyOperationOperationTypeEnum { + CalendarDate = 'CALENDAR_DATE' +} diff --git a/codegen/crm/lists/models/PublicCampaignInfluencedFilter.ts b/codegen/crm/lists/models/PublicCampaignInfluencedFilter.ts index 7d40b7e44..902deb272 100644 --- a/codegen/crm/lists/models/PublicCampaignInfluencedFilter.ts +++ b/codegen/crm/lists/models/PublicCampaignInfluencedFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,23 +12,23 @@ export class PublicCampaignInfluencedFilter { - 'filterType': PublicCampaignInfluencedFilterFilterTypeEnum; 'campaignId': string; + 'filterType': PublicCampaignInfluencedFilterFilterTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicCampaignInfluencedFilterFilterTypeEnum", - "format": "" - }, { "name": "campaignId", "baseName": "campaignId", "type": "string", "format": "" + }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicCampaignInfluencedFilterFilterTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicCommunicationSubscriptionFilter.ts b/codegen/crm/lists/models/PublicCommunicationSubscriptionFilter.ts index 1dc84fe45..45c23b023 100644 --- a/codegen/crm/lists/models/PublicCommunicationSubscriptionFilter.ts +++ b/codegen/crm/lists/models/PublicCommunicationSubscriptionFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,27 +12,27 @@ export class PublicCommunicationSubscriptionFilter { - 'filterType': PublicCommunicationSubscriptionFilterFilterTypeEnum; - 'subscriptionIds': Array; + 'subscriptionType': string; + 'subscriptionIds': Array; 'channel': string; 'acceptedOptStates': Array; - 'businessUnitId'?: number; - 'subscriptionType': string; + 'filterType': PublicCommunicationSubscriptionFilterFilterTypeEnum; + 'businessUnitId'?: string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicCommunicationSubscriptionFilterFilterTypeEnum", + "name": "subscriptionType", + "baseName": "subscriptionType", + "type": "string", "format": "" }, { "name": "subscriptionIds", "baseName": "subscriptionIds", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { "name": "channel", @@ -47,14 +47,14 @@ export class PublicCommunicationSubscriptionFilter { "format": "" }, { - "name": "businessUnitId", - "baseName": "businessUnitId", - "type": "number", - "format": "int64" + "name": "filterType", + "baseName": "filterType", + "type": "PublicCommunicationSubscriptionFilterFilterTypeEnum", + "format": "" }, { - "name": "subscriptionType", - "baseName": "subscriptionType", + "name": "businessUnitId", + "baseName": "businessUnitId", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicComparativeDatePropertyOperation.ts b/codegen/crm/lists/models/PublicComparativeDatePropertyOperation.ts index c98c88b90..d8f89847e 100644 --- a/codegen/crm/lists/models/PublicComparativeDatePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicComparativeDatePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,31 +12,31 @@ export class PublicComparativeDatePropertyOperation { - 'operationType': PublicComparativeDatePropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; - 'comparisonPropertyName': string; 'defaultComparisonValue'?: string; + 'operationType': PublicComparativeDatePropertyOperationOperationTypeEnum; + 'comparisonPropertyName': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicComparativeDatePropertyOperationOperationTypeEnum", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "defaultComparisonValue", + "baseName": "defaultComparisonValue", "type": "string", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", + "name": "operationType", + "baseName": "operationType", + "type": "PublicComparativeDatePropertyOperationOperationTypeEnum", "format": "" }, { @@ -46,8 +46,8 @@ export class PublicComparativeDatePropertyOperation { "format": "" }, { - "name": "defaultComparisonValue", - "baseName": "defaultComparisonValue", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicComparativePropertyUpdatedOperation.ts b/codegen/crm/lists/models/PublicComparativePropertyUpdatedOperation.ts index 012ccf19c..3b87748b6 100644 --- a/codegen/crm/lists/models/PublicComparativePropertyUpdatedOperation.ts +++ b/codegen/crm/lists/models/PublicComparativePropertyUpdatedOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,31 +12,31 @@ export class PublicComparativePropertyUpdatedOperation { - 'operationType': PublicComparativePropertyUpdatedOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; - 'comparisonPropertyName': string; 'defaultComparisonValue'?: string; + 'operationType': PublicComparativePropertyUpdatedOperationOperationTypeEnum; + 'comparisonPropertyName': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicComparativePropertyUpdatedOperationOperationTypeEnum", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "defaultComparisonValue", + "baseName": "defaultComparisonValue", "type": "string", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", + "name": "operationType", + "baseName": "operationType", + "type": "PublicComparativePropertyUpdatedOperationOperationTypeEnum", "format": "" }, { @@ -46,8 +46,8 @@ export class PublicComparativePropertyUpdatedOperation { "format": "" }, { - "name": "defaultComparisonValue", - "baseName": "defaultComparisonValue", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicConstantFilter.ts b/codegen/crm/lists/models/PublicConstantFilter.ts index 028330315..0c697c7f6 100644 --- a/codegen/crm/lists/models/PublicConstantFilter.ts +++ b/codegen/crm/lists/models/PublicConstantFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,19 +12,13 @@ export class PublicConstantFilter { - 'filterType': PublicConstantFilterFilterTypeEnum; 'shouldAccept': boolean; 'source'?: string; + 'filterType': PublicConstantFilterFilterTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicConstantFilterFilterTypeEnum", - "format": "" - }, { "name": "shouldAccept", "baseName": "shouldAccept", @@ -36,6 +30,12 @@ export class PublicConstantFilter { "baseName": "source", "type": "string", "format": "" + }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicConstantFilterFilterTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicCtaAnalyticsFilter.ts b/codegen/crm/lists/models/PublicCtaAnalyticsFilter.ts index 392692d79..edab564a5 100644 --- a/codegen/crm/lists/models/PublicCtaAnalyticsFilter.ts +++ b/codegen/crm/lists/models/PublicCtaAnalyticsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,40 +10,34 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicCtaAnalyticsFilter { + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'filterType': PublicCtaAnalyticsFilterFilterTypeEnum; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': string; 'ctaName': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicCtaAnalyticsFilterFilterTypeEnum", - "format": "" - }, { "name": "coalescingRefineBy", "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { "name": "pruningRefineBy", "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "string", + "name": "filterType", + "baseName": "filterType", + "type": "PublicCtaAnalyticsFilterFilterTypeEnum", "format": "" }, { @@ -51,6 +45,12 @@ export class PublicCtaAnalyticsFilter { "baseName": "ctaName", "type": "string", "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicDatePoint.ts b/codegen/crm/lists/models/PublicDatePoint.ts index f75bbc712..c97ca2c23 100644 --- a/codegen/crm/lists/models/PublicDatePoint.ts +++ b/codegen/crm/lists/models/PublicDatePoint.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,37 +12,31 @@ export class PublicDatePoint { - 'timeType': PublicDatePointTimeTypeEnum; + 'month': number; + 'hour'?: number; + 'year': number; 'timezoneSource'?: string; + 'millisecond'?: number; + 'timeType': PublicDatePointTimeTypeEnum; 'zoneId': string; - 'year': number; - 'month': number; 'day': number; - 'hour'?: number; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "timeType", - "baseName": "timeType", - "type": "PublicDatePointTimeTypeEnum", - "format": "" - }, - { - "name": "timezoneSource", - "baseName": "timezoneSource", - "type": "string", - "format": "" + "name": "month", + "baseName": "month", + "type": "number", + "format": "int32" }, { - "name": "zoneId", - "baseName": "zoneId", - "type": "string", - "format": "" + "name": "hour", + "baseName": "hour", + "type": "number", + "format": "int32" }, { "name": "year", @@ -51,20 +45,32 @@ export class PublicDatePoint { "format": "int32" }, { - "name": "month", - "baseName": "month", - "type": "number", - "format": "int32" + "name": "timezoneSource", + "baseName": "timezoneSource", + "type": "string", + "format": "" }, { - "name": "day", - "baseName": "day", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "hour", - "baseName": "hour", + "name": "timeType", + "baseName": "timeType", + "type": "PublicDatePointTimeTypeEnum", + "format": "" + }, + { + "name": "zoneId", + "baseName": "zoneId", + "type": "string", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, @@ -79,12 +85,6 @@ export class PublicDatePoint { "baseName": "second", "type": "number", "format": "int32" - }, - { - "name": "millisecond", - "baseName": "millisecond", - "type": "number", - "format": "int32" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicDatePropertyOperation.ts b/codegen/crm/lists/models/PublicDatePropertyOperation.ts index 01a3267a8..a2aa8ee49 100644 --- a/codegen/crm/lists/models/PublicDatePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicDatePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,34 +12,28 @@ export class PublicDatePropertyOperation { - 'operationType': PublicDatePropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; - 'year': number; 'month': string; + 'year': number; + 'operationType': PublicDatePropertyOperationOperationTypeEnum; 'day': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicDatePropertyOperationOperationTypeEnum", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "month", + "baseName": "month", "type": "string", "format": "" }, - { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", - "format": "" - }, { "name": "year", "baseName": "year", @@ -47,9 +41,9 @@ export class PublicDatePropertyOperation { "format": "int32" }, { - "name": "month", - "baseName": "month", - "type": "string", + "name": "operationType", + "baseName": "operationType", + "type": "PublicDatePropertyOperationOperationTypeEnum", "format": "" }, { @@ -57,6 +51,12 @@ export class PublicDatePropertyOperation { "baseName": "day", "type": "number", "format": "int32" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicDateTimePropertyOperation.ts b/codegen/crm/lists/models/PublicDateTimePropertyOperation.ts index 1d7533f15..5785ecce4 100644 --- a/codegen/crm/lists/models/PublicDateTimePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicDateTimePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,27 +12,15 @@ export class PublicDateTimePropertyOperation { - 'operationType': PublicDateTimePropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; 'requiresTimeZoneConversion': boolean; + 'operationType': PublicDateTimePropertyOperationOperationTypeEnum; + 'operator': string; 'timestamp': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicDateTimePropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", @@ -45,6 +33,18 @@ export class PublicDateTimePropertyOperation { "type": "boolean", "format": "" }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicDateTimePropertyOperationOperationTypeEnum", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" + }, { "name": "timestamp", "baseName": "timestamp", diff --git a/codegen/crm/lists/models/PublicEmailEventFilter.ts b/codegen/crm/lists/models/PublicEmailEventFilter.ts index a3dc4fb1c..09a29fb49 100644 --- a/codegen/crm/lists/models/PublicEmailEventFilter.ts +++ b/codegen/crm/lists/models/PublicEmailEventFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,24 +10,24 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicEmailEventFilter { - 'filterType': PublicEmailEventFilterFilterTypeEnum; + 'clickUrl'?: string; 'level': string; - 'emailId': number; - 'appId': number; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'appId': string; + 'emailId': string; + 'filterType': PublicEmailEventFilterFilterTypeEnum; 'operator': PublicEmailEventFilterOperatorEnum; - 'clickUrl'?: string; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicEmailEventFilterFilterTypeEnum", + "name": "clickUrl", + "baseName": "clickUrl", + "type": "string", "format": "" }, { @@ -37,33 +37,33 @@ export class PublicEmailEventFilter { "format": "" }, { - "name": "emailId", - "baseName": "emailId", - "type": "number", - "format": "int32" + "name": "pruningRefineBy", + "baseName": "pruningRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", + "format": "" }, { "name": "appId", "baseName": "appId", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "PublicEmailEventFilterOperatorEnum", + "name": "emailId", + "baseName": "emailId", + "type": "string", "format": "" }, { - "name": "clickUrl", - "baseName": "clickUrl", - "type": "string", + "name": "filterType", + "baseName": "filterType", + "type": "PublicEmailEventFilterFilterTypeEnum", "format": "" }, { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "operator", + "baseName": "operator", + "type": "PublicEmailEventFilterOperatorEnum", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicEmailSubscriptionFilter.ts b/codegen/crm/lists/models/PublicEmailSubscriptionFilter.ts index 76f5afcfb..e7176baa7 100644 --- a/codegen/crm/lists/models/PublicEmailSubscriptionFilter.ts +++ b/codegen/crm/lists/models/PublicEmailSubscriptionFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,36 +12,36 @@ export class PublicEmailSubscriptionFilter { + 'subscriptionType'?: string; + 'subscriptionIds': Array; 'filterType': PublicEmailSubscriptionFilterFilterTypeEnum; - 'subscriptionIds': Array; 'acceptedStatuses': Array; - 'subscriptionType'?: string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicEmailSubscriptionFilterFilterTypeEnum", + "name": "subscriptionType", + "baseName": "subscriptionType", + "type": "string", "format": "" }, { "name": "subscriptionIds", "baseName": "subscriptionIds", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { - "name": "acceptedStatuses", - "baseName": "acceptedStatuses", - "type": "Array", + "name": "filterType", + "baseName": "filterType", + "type": "PublicEmailSubscriptionFilterFilterTypeEnum", "format": "" }, { - "name": "subscriptionType", - "baseName": "subscriptionType", - "type": "string", + "name": "acceptedStatuses", + "baseName": "acceptedStatuses", + "type": "Array", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicEnumerationPropertyOperation.ts b/codegen/crm/lists/models/PublicEnumerationPropertyOperation.ts index a02d86fd7..a459dcffc 100644 --- a/codegen/crm/lists/models/PublicEnumerationPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicEnumerationPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,26 +12,14 @@ export class PublicEnumerationPropertyOperation { - 'operationType': PublicEnumerationPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; 'values': Array; + 'operationType': PublicEnumerationPropertyOperationOperationTypeEnum; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicEnumerationPropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", @@ -43,6 +31,18 @@ export class PublicEnumerationPropertyOperation { "baseName": "values", "type": "Array", "format": "" + }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicEnumerationPropertyOperationOperationTypeEnum", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicEventAnalyticsFilter.ts b/codegen/crm/lists/models/PublicEventAnalyticsFilter.ts index 94b600d6d..7b4c10068 100644 --- a/codegen/crm/lists/models/PublicEventAnalyticsFilter.ts +++ b/codegen/crm/lists/models/PublicEventAnalyticsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,45 +10,45 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicEventAnalyticsFilter { + 'eventId': string; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'filterType': PublicEventAnalyticsFilterFilterTypeEnum; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; 'operator': string; - 'eventId': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicEventAnalyticsFilterFilterTypeEnum", + "name": "eventId", + "baseName": "eventId", + "type": "string", "format": "" }, { "name": "coalescingRefineBy", "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { "name": "pruningRefineBy", "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "string", + "name": "filterType", + "baseName": "filterType", + "type": "PublicEventAnalyticsFilterFilterTypeEnum", "format": "" }, { - "name": "eventId", - "baseName": "eventId", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicEventFilterMetadata.ts b/codegen/crm/lists/models/PublicEventFilterMetadata.ts index d18745b7c..3930b532c 100644 --- a/codegen/crm/lists/models/PublicEventFilterMetadata.ts +++ b/codegen/crm/lists/models/PublicEventFilterMetadata.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,11 +10,11 @@ * Do not edit the class manually. */ -import { PublicPropertyFilterOperation } from '../models/PublicPropertyFilterOperation'; +import { PublicSurveyMonkeyValueFilterValueComparison } from '../models/PublicSurveyMonkeyValueFilterValueComparison'; export class PublicEventFilterMetadata { 'property': string; - 'operation': PublicPropertyFilterOperation; + 'operation': PublicSurveyMonkeyValueFilterValueComparison; static readonly discriminator: string | undefined = undefined; @@ -28,7 +28,7 @@ export class PublicEventFilterMetadata { { "name": "operation", "baseName": "operation", - "type": "PublicPropertyFilterOperation", + "type": "PublicSurveyMonkeyValueFilterValueComparison", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicFiscalQuarterReference.ts b/codegen/crm/lists/models/PublicFiscalQuarterReference.ts index 7e0b693d9..262028848 100644 --- a/codegen/crm/lists/models/PublicFiscalQuarterReference.ts +++ b/codegen/crm/lists/models/PublicFiscalQuarterReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,23 +12,17 @@ export class PublicFiscalQuarterReference { - 'referenceType': PublicFiscalQuarterReferenceReferenceTypeEnum; 'hour'?: number; - 'minute'?: number; - 'second'?: number; - 'millisecond'?: number; 'month': number; + 'millisecond'?: number; + 'referenceType': PublicFiscalQuarterReferenceReferenceTypeEnum; 'day': number; + 'minute'?: number; + 'second'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicFiscalQuarterReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -36,32 +30,38 @@ export class PublicFiscalQuarterReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "month", + "baseName": "month", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicFiscalQuarterReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, { - "name": "month", - "baseName": "month", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "day", - "baseName": "day", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicFiscalYearReference.ts b/codegen/crm/lists/models/PublicFiscalYearReference.ts index 6439be2d0..5fa3e0492 100644 --- a/codegen/crm/lists/models/PublicFiscalYearReference.ts +++ b/codegen/crm/lists/models/PublicFiscalYearReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,23 +12,17 @@ export class PublicFiscalYearReference { - 'referenceType': PublicFiscalYearReferenceReferenceTypeEnum; 'hour'?: number; - 'minute'?: number; - 'second'?: number; - 'millisecond'?: number; 'month': number; + 'millisecond'?: number; + 'referenceType': PublicFiscalYearReferenceReferenceTypeEnum; 'day': number; + 'minute'?: number; + 'second'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicFiscalYearReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -36,32 +30,38 @@ export class PublicFiscalYearReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "month", + "baseName": "month", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicFiscalYearReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, { - "name": "month", - "baseName": "month", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "day", - "baseName": "day", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicFormSubmissionFilter.ts b/codegen/crm/lists/models/PublicFormSubmissionFilter.ts index 2be62409b..1ba4923a4 100644 --- a/codegen/crm/lists/models/PublicFormSubmissionFilter.ts +++ b/codegen/crm/lists/models/PublicFormSubmissionFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,40 +10,40 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicFormSubmissionFilter { - 'filterType': PublicFormSubmissionFilterFilterTypeEnum; 'formId'?: string; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'filterType': PublicFormSubmissionFilterFilterTypeEnum; 'operator': PublicFormSubmissionFilterOperatorEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicFormSubmissionFilterFilterTypeEnum", - "format": "" - }, { "name": "formId", "baseName": "formId", "type": "string", "format": "" }, + { + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", + "format": "" + }, { "name": "pruningRefineBy", "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "filterType", + "baseName": "filterType", + "type": "PublicFormSubmissionFilterFilterTypeEnum", "format": "" }, { diff --git a/codegen/crm/lists/models/PublicEventAnalyticsFilterCoalescingRefineBy.ts b/codegen/crm/lists/models/PublicFormSubmissionFilterCoalescingRefineBy.ts similarity index 95% rename from codegen/crm/lists/models/PublicEventAnalyticsFilterCoalescingRefineBy.ts rename to codegen/crm/lists/models/PublicFormSubmissionFilterCoalescingRefineBy.ts index a38730282..146aee9d9 100644 --- a/codegen/crm/lists/models/PublicEventAnalyticsFilterCoalescingRefineBy.ts +++ b/codegen/crm/lists/models/PublicFormSubmissionFilterCoalescingRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,33 +13,39 @@ import { PublicTimeOffset } from '../models/PublicTimeOffset'; import { PublicTimePointOperationTimePoint } from '../models/PublicTimePointOperationTimePoint'; -export class PublicEventAnalyticsFilterCoalescingRefineBy { +export class PublicFormSubmissionFilterCoalescingRefineBy { + 'maxOccurrences'?: number; 'type': string; 'minOccurrences'?: number; - 'maxOccurrences'?: number; 'setType': string; 'comparison': string; 'timeOffset': PublicTimeOffset; - 'rangeType': string; 'upperBoundOffset': PublicTimeOffset; + 'rangeType': string; 'lowerBoundOffset': PublicTimeOffset; 'timestamp': number; - 'lowerTimestamp': number; 'upperTimestamp': number; - 'operationType': string; - 'operator': string; - 'includeObjectsWithNoValueSet': boolean; - 'timePoint': PublicTimePointOperationTimePoint; + 'lowerTimestamp': number; 'endpointBehavior'?: string; + 'includeObjectsWithNoValueSet': boolean; 'propertyParser'?: string; - 'lowerBoundEndpointBehavior'?: string; + 'operationType': string; + 'timePoint': PublicTimePointOperationTimePoint; + 'operator': string; 'upperBoundEndpointBehavior'?: string; - 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; 'upperBoundTimePoint': PublicTimePointOperationTimePoint; + 'lowerBoundEndpointBehavior'?: string; + 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "maxOccurrences", + "baseName": "maxOccurrences", + "type": "number", + "format": "int32" + }, { "name": "type", "baseName": "type", @@ -52,12 +58,6 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "type": "number", "format": "int32" }, - { - "name": "maxOccurrences", - "baseName": "maxOccurrences", - "type": "number", - "format": "int32" - }, { "name": "setType", "baseName": "setType", @@ -76,18 +76,18 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "type": "PublicTimeOffset", "format": "" }, - { - "name": "rangeType", - "baseName": "rangeType", - "type": "string", - "format": "" - }, { "name": "upperBoundOffset", "baseName": "upperBoundOffset", "type": "PublicTimeOffset", "format": "" }, + { + "name": "rangeType", + "baseName": "rangeType", + "type": "string", + "format": "" + }, { "name": "lowerBoundOffset", "baseName": "lowerBoundOffset", @@ -100,12 +100,6 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "type": "number", "format": "int64" }, - { - "name": "lowerTimestamp", - "baseName": "lowerTimestamp", - "type": "number", - "format": "int64" - }, { "name": "upperTimestamp", "baseName": "upperTimestamp", @@ -113,14 +107,14 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "format": "int64" }, { - "name": "operationType", - "baseName": "operationType", - "type": "string", - "format": "" + "name": "lowerTimestamp", + "baseName": "lowerTimestamp", + "type": "number", + "format": "int64" }, { - "name": "operator", - "baseName": "operator", + "name": "endpointBehavior", + "baseName": "endpointBehavior", "type": "string", "format": "" }, @@ -131,26 +125,26 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "format": "" }, { - "name": "timePoint", - "baseName": "timePoint", - "type": "PublicTimePointOperationTimePoint", + "name": "propertyParser", + "baseName": "propertyParser", + "type": "string", "format": "" }, { - "name": "endpointBehavior", - "baseName": "endpointBehavior", + "name": "operationType", + "baseName": "operationType", "type": "string", "format": "" }, { - "name": "propertyParser", - "baseName": "propertyParser", - "type": "string", + "name": "timePoint", + "baseName": "timePoint", + "type": "PublicTimePointOperationTimePoint", "format": "" }, { - "name": "lowerBoundEndpointBehavior", - "baseName": "lowerBoundEndpointBehavior", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" }, @@ -161,20 +155,26 @@ export class PublicEventAnalyticsFilterCoalescingRefineBy { "format": "" }, { - "name": "lowerBoundTimePoint", - "baseName": "lowerBoundTimePoint", + "name": "upperBoundTimePoint", + "baseName": "upperBoundTimePoint", "type": "PublicTimePointOperationTimePoint", "format": "" }, { - "name": "upperBoundTimePoint", - "baseName": "upperBoundTimePoint", + "name": "lowerBoundEndpointBehavior", + "baseName": "lowerBoundEndpointBehavior", + "type": "string", + "format": "" + }, + { + "name": "lowerBoundTimePoint", + "baseName": "lowerBoundTimePoint", "type": "PublicTimePointOperationTimePoint", "format": "" } ]; static getAttributeTypeMap() { - return PublicEventAnalyticsFilterCoalescingRefineBy.attributeTypeMap; + return PublicFormSubmissionFilterCoalescingRefineBy.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/lists/models/PublicFormSubmissionOnPageFilter.ts b/codegen/crm/lists/models/PublicFormSubmissionOnPageFilter.ts index 5bbe88546..b699337c9 100644 --- a/codegen/crm/lists/models/PublicFormSubmissionOnPageFilter.ts +++ b/codegen/crm/lists/models/PublicFormSubmissionOnPageFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,25 +10,19 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicFormSubmissionOnPageFilter { - 'filterType': PublicFormSubmissionOnPageFilterFilterTypeEnum; 'formId'?: string; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': PublicFormSubmissionOnPageFilterOperatorEnum; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'filterType': PublicFormSubmissionOnPageFilterFilterTypeEnum; 'pageId': string; + 'operator': PublicFormSubmissionOnPageFilterOperatorEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicFormSubmissionOnPageFilterFilterTypeEnum", - "format": "" - }, { "name": "formId", "baseName": "formId", @@ -36,21 +30,21 @@ export class PublicFormSubmissionOnPageFilter { "format": "" }, { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "pruningRefineBy", + "baseName": "pruningRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "PublicFormSubmissionOnPageFilterOperatorEnum", + "name": "filterType", + "baseName": "filterType", + "type": "PublicFormSubmissionOnPageFilterFilterTypeEnum", "format": "" }, { @@ -58,6 +52,12 @@ export class PublicFormSubmissionOnPageFilter { "baseName": "pageId", "type": "string", "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "PublicFormSubmissionOnPageFilterOperatorEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicInListFilter.ts b/codegen/crm/lists/models/PublicInListFilter.ts index 6918a263f..a55ccc838 100644 --- a/codegen/crm/lists/models/PublicInListFilter.ts +++ b/codegen/crm/lists/models/PublicInListFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,25 +13,19 @@ import { PublicInListFilterMetadata } from '../models/PublicInListFilterMetadata'; export class PublicInListFilter { - 'filterType': PublicInListFilterFilterTypeEnum; - 'listId': number; + 'listId': string; 'metadata'?: PublicInListFilterMetadata; + 'filterType': PublicInListFilterFilterTypeEnum; 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicInListFilterFilterTypeEnum", - "format": "" - }, { "name": "listId", "baseName": "listId", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "metadata", @@ -39,6 +33,12 @@ export class PublicInListFilter { "type": "PublicInListFilterMetadata", "format": "" }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicInListFilterFilterTypeEnum", + "format": "" + }, { "name": "operator", "baseName": "operator", diff --git a/codegen/crm/lists/models/PublicInListFilterMetadata.ts b/codegen/crm/lists/models/PublicInListFilterMetadata.ts index c261cc3e8..bc36284d7 100644 --- a/codegen/crm/lists/models/PublicInListFilterMetadata.ts +++ b/codegen/crm/lists/models/PublicInListFilterMetadata.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/lists/models/PublicIndexOffset.ts b/codegen/crm/lists/models/PublicIndexOffset.ts index 4db31e036..b027952e7 100644 --- a/codegen/crm/lists/models/PublicIndexOffset.ts +++ b/codegen/crm/lists/models/PublicIndexOffset.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,70 +12,70 @@ export class PublicIndexOffset { - 'years'?: number; - 'quarters'?: number; + 'milliseconds'?: number; + 'hours'?: number; + 'seconds'?: number; 'months'?: number; 'weeks'?: number; - 'days'?: number; - 'hours'?: number; 'minutes'?: number; - 'seconds'?: number; - 'milliseconds'?: number; + 'quarters'?: number; + 'days'?: number; + 'years'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "years", - "baseName": "years", + "name": "milliseconds", + "baseName": "milliseconds", "type": "number", "format": "int32" }, { - "name": "quarters", - "baseName": "quarters", + "name": "hours", + "baseName": "hours", "type": "number", "format": "int32" }, { - "name": "months", - "baseName": "months", + "name": "seconds", + "baseName": "seconds", "type": "number", "format": "int32" }, { - "name": "weeks", - "baseName": "weeks", + "name": "months", + "baseName": "months", "type": "number", "format": "int32" }, { - "name": "days", - "baseName": "days", + "name": "weeks", + "baseName": "weeks", "type": "number", "format": "int32" }, { - "name": "hours", - "baseName": "hours", + "name": "minutes", + "baseName": "minutes", "type": "number", "format": "int32" }, { - "name": "minutes", - "baseName": "minutes", + "name": "quarters", + "baseName": "quarters", "type": "number", "format": "int32" }, { - "name": "seconds", - "baseName": "seconds", + "name": "days", + "baseName": "days", "type": "number", "format": "int32" }, { - "name": "milliseconds", - "baseName": "milliseconds", + "name": "years", + "baseName": "years", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicIndexedTimePoint.ts b/codegen/crm/lists/models/PublicIndexedTimePoint.ts index 033ae8852..22f441ff8 100644 --- a/codegen/crm/lists/models/PublicIndexedTimePoint.ts +++ b/codegen/crm/lists/models/PublicIndexedTimePoint.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -14,19 +14,19 @@ import { PublicIndexOffset } from '../models/PublicIndexOffset'; import { PublicIndexedTimePointIndexReference } from '../models/PublicIndexedTimePointIndexReference'; export class PublicIndexedTimePoint { - 'timeType': PublicIndexedTimePointTimeTypeEnum; + 'offset'?: PublicIndexOffset; 'timezoneSource'?: string; - 'zoneId': string; 'indexReference': PublicIndexedTimePointIndexReference; - 'offset'?: PublicIndexOffset; + 'timeType': PublicIndexedTimePointTimeTypeEnum; + 'zoneId': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "timeType", - "baseName": "timeType", - "type": "PublicIndexedTimePointTimeTypeEnum", + "name": "offset", + "baseName": "offset", + "type": "PublicIndexOffset", "format": "" }, { @@ -35,12 +35,6 @@ export class PublicIndexedTimePoint { "type": "string", "format": "" }, - { - "name": "zoneId", - "baseName": "zoneId", - "type": "string", - "format": "" - }, { "name": "indexReference", "baseName": "indexReference", @@ -48,9 +42,15 @@ export class PublicIndexedTimePoint { "format": "" }, { - "name": "offset", - "baseName": "offset", - "type": "PublicIndexOffset", + "name": "timeType", + "baseName": "timeType", + "type": "PublicIndexedTimePointTimeTypeEnum", + "format": "" + }, + { + "name": "zoneId", + "baseName": "zoneId", + "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicIndexedTimePointIndexReference.ts b/codegen/crm/lists/models/PublicIndexedTimePointIndexReference.ts index d2ad3424e..f002989a8 100644 --- a/codegen/crm/lists/models/PublicIndexedTimePointIndexReference.ts +++ b/codegen/crm/lists/models/PublicIndexedTimePointIndexReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,11 +12,11 @@ export class PublicIndexedTimePointIndexReference { - 'referenceType': PublicIndexedTimePointIndexReferenceReferenceTypeEnum; 'hour'?: number; + 'millisecond'?: number; + 'referenceType': PublicIndexedTimePointIndexReferenceReferenceTypeEnum; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; 'dayOfWeek': PublicIndexedTimePointIndexReferenceDayOfWeekEnum; 'month': number; 'day': number; @@ -24,12 +24,6 @@ export class PublicIndexedTimePointIndexReference { static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicIndexedTimePointIndexReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -37,20 +31,26 @@ export class PublicIndexedTimePointIndexReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicIndexedTimePointIndexReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" }, diff --git a/codegen/crm/lists/models/PublicIntegrationEventFilter.ts b/codegen/crm/lists/models/PublicIntegrationEventFilter.ts index 9f7bd9b8d..e3a607f2e 100644 --- a/codegen/crm/lists/models/PublicIntegrationEventFilter.ts +++ b/codegen/crm/lists/models/PublicIntegrationEventFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,19 +13,13 @@ import { PublicEventFilterMetadata } from '../models/PublicEventFilterMetadata'; export class PublicIntegrationEventFilter { - 'filterType': PublicIntegrationEventFilterFilterTypeEnum; 'eventTypeId': number; 'filterLines': Array; + 'filterType': PublicIntegrationEventFilterFilterTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicIntegrationEventFilterFilterTypeEnum", - "format": "" - }, { "name": "eventTypeId", "baseName": "eventTypeId", @@ -37,6 +31,12 @@ export class PublicIntegrationEventFilter { "baseName": "filterLines", "type": "Array", "format": "" + }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicIntegrationEventFilterFilterTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicListFolder.ts b/codegen/crm/lists/models/PublicListFolder.ts new file mode 100644 index 000000000..c656e0a46 --- /dev/null +++ b/codegen/crm/lists/models/PublicListFolder.ts @@ -0,0 +1,114 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class PublicListFolder { + /** + * The time the folder was created at. + */ + 'createdAt'?: Date; + /** + * The Id of the folder this folder is in, the root folder is represented as 0. + */ + 'parentFolderId': number; + 'childNodes': Array; + /** + * The name of the folder. + */ + 'name'?: string; + /** + * The Id of the folder. + */ + 'id': number; + /** + * An array of list Id\'s contained in this folder. + */ + 'childLists': Array; + /** + * The time that the contents of the folder was last updated at. + */ + 'updatedContentsAt'?: Date; + /** + * The user Id of the owner of the folder. + */ + 'userId'?: number; + /** + * The time the folder was last updated at. + */ + 'updatedAt'?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "parentFolderId", + "baseName": "parentFolderId", + "type": "number", + "format": "int32" + }, + { + "name": "childNodes", + "baseName": "childNodes", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "number", + "format": "int32" + }, + { + "name": "childLists", + "baseName": "childLists", + "type": "Array", + "format": "int32" + }, + { + "name": "updatedContentsAt", + "baseName": "updatedContentsAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "userId", + "baseName": "userId", + "type": "number", + "format": "int32" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return PublicListFolder.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/PublicMigrationMapping.ts b/codegen/crm/lists/models/PublicMigrationMapping.ts new file mode 100644 index 000000000..5b7777aaa --- /dev/null +++ b/codegen/crm/lists/models/PublicMigrationMapping.ts @@ -0,0 +1,47 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class PublicMigrationMapping { + /** + * The V3 list id for the list + */ + 'listId': string; + /** + * The legacy list id for the list + */ + 'legacyListId': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "listId", + "baseName": "listId", + "type": "string", + "format": "" + }, + { + "name": "legacyListId", + "baseName": "legacyListId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PublicMigrationMapping.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/PublicMonthReference.ts b/codegen/crm/lists/models/PublicMonthReference.ts index 05b2675d8..c44faf6fa 100644 --- a/codegen/crm/lists/models/PublicMonthReference.ts +++ b/codegen/crm/lists/models/PublicMonthReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,22 +12,16 @@ export class PublicMonthReference { - 'referenceType': PublicMonthReferenceReferenceTypeEnum; 'hour'?: number; - 'minute'?: number; - 'second'?: number; 'millisecond'?: number; + 'referenceType': PublicMonthReferenceReferenceTypeEnum; 'day': number; + 'minute'?: number; + 'second'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicMonthReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -35,26 +29,32 @@ export class PublicMonthReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicMonthReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "day", - "baseName": "day", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicMultiStringPropertyOperation.ts b/codegen/crm/lists/models/PublicMultiStringPropertyOperation.ts index bdbe8afaf..f02418ed2 100644 --- a/codegen/crm/lists/models/PublicMultiStringPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicMultiStringPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,26 +12,14 @@ export class PublicMultiStringPropertyOperation { - 'operationType': PublicMultiStringPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; 'values': Array; + 'operationType': PublicMultiStringPropertyOperationOperationTypeEnum; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicMultiStringPropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", @@ -43,6 +31,18 @@ export class PublicMultiStringPropertyOperation { "baseName": "values", "type": "Array", "format": "" + }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicMultiStringPropertyOperationOperationTypeEnum", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicNotAllFilterBranch.ts b/codegen/crm/lists/models/PublicNotAllFilterBranch.ts index 0c1bb78d9..79a19c1ab 100644 --- a/codegen/crm/lists/models/PublicNotAllFilterBranch.ts +++ b/codegen/crm/lists/models/PublicNotAllFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -15,8 +15,8 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicNotAllFilterBranch { 'filterBranchType': PublicNotAllFilterBranchFilterBranchTypeEnum; - 'filterBranchOperator': string; 'filterBranches': Array; + 'filterBranchOperator': string; 'filters': Array; static readonly discriminator: string | undefined = undefined; @@ -28,18 +28,18 @@ export class PublicNotAllFilterBranch { "type": "PublicNotAllFilterBranchFilterBranchTypeEnum", "format": "" }, - { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", - "type": "string", - "format": "" - }, { "name": "filterBranches", "baseName": "filterBranches", "type": "Array", "format": "" }, + { + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", + "type": "string", + "format": "" + }, { "name": "filters", "baseName": "filters", diff --git a/codegen/crm/lists/models/PublicNotAnyFilterBranch.ts b/codegen/crm/lists/models/PublicNotAnyFilterBranch.ts index ef0fd56f9..e4d5af1e3 100644 --- a/codegen/crm/lists/models/PublicNotAnyFilterBranch.ts +++ b/codegen/crm/lists/models/PublicNotAnyFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -15,8 +15,8 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicNotAnyFilterBranch { 'filterBranchType': PublicNotAnyFilterBranchFilterBranchTypeEnum; - 'filterBranchOperator': string; 'filterBranches': Array; + 'filterBranchOperator': string; 'filters': Array; static readonly discriminator: string | undefined = undefined; @@ -28,18 +28,18 @@ export class PublicNotAnyFilterBranch { "type": "PublicNotAnyFilterBranchFilterBranchTypeEnum", "format": "" }, - { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", - "type": "string", - "format": "" - }, { "name": "filterBranches", "baseName": "filterBranches", "type": "Array", "format": "" }, + { + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", + "type": "string", + "format": "" + }, { "name": "filters", "baseName": "filters", diff --git a/codegen/crm/lists/models/PublicNowReference.ts b/codegen/crm/lists/models/PublicNowReference.ts index ec3252824..1c14b7594 100644 --- a/codegen/crm/lists/models/PublicNowReference.ts +++ b/codegen/crm/lists/models/PublicNowReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,21 +12,15 @@ export class PublicNowReference { - 'referenceType': PublicNowReferenceReferenceTypeEnum; 'hour'?: number; + 'millisecond'?: number; + 'referenceType': PublicNowReferenceReferenceTypeEnum; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicNowReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -34,20 +28,26 @@ export class PublicNowReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicNowReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicNumAssociationsFilter.ts b/codegen/crm/lists/models/PublicNumAssociationsFilter.ts index 763f3b6bb..b2bd11a81 100644 --- a/codegen/crm/lists/models/PublicNumAssociationsFilter.ts +++ b/codegen/crm/lists/models/PublicNumAssociationsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,21 +10,21 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicNumAssociationsFilter { - 'filterType': PublicNumAssociationsFilterFilterTypeEnum; + 'coalescingRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; 'associationTypeId': number; 'associationCategory': string; - 'coalescingRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; + 'filterType': PublicNumAssociationsFilterFilterTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicNumAssociationsFilterFilterTypeEnum", + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { @@ -40,9 +40,9 @@ export class PublicNumAssociationsFilter { "format": "" }, { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "filterType", + "baseName": "filterType", + "type": "PublicNumAssociationsFilterFilterTypeEnum", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicNumOccurrencesRefineBy.ts b/codegen/crm/lists/models/PublicNumOccurrencesRefineBy.ts index 88751530a..f77cb0639 100644 --- a/codegen/crm/lists/models/PublicNumOccurrencesRefineBy.ts +++ b/codegen/crm/lists/models/PublicNumOccurrencesRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,13 +12,19 @@ export class PublicNumOccurrencesRefineBy { + 'maxOccurrences'?: number; 'type': PublicNumOccurrencesRefineByTypeEnum; 'minOccurrences'?: number; - 'maxOccurrences'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "maxOccurrences", + "baseName": "maxOccurrences", + "type": "number", + "format": "int32" + }, { "name": "type", "baseName": "type", @@ -30,12 +36,6 @@ export class PublicNumOccurrencesRefineBy { "baseName": "minOccurrences", "type": "number", "format": "int32" - }, - { - "name": "maxOccurrences", - "baseName": "maxOccurrences", - "type": "number", - "format": "int32" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicNumberPropertyOperation.ts b/codegen/crm/lists/models/PublicNumberPropertyOperation.ts index dbd0f82d6..0c23f0ab0 100644 --- a/codegen/crm/lists/models/PublicNumberPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicNumberPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,37 +12,37 @@ export class PublicNumberPropertyOperation { - 'operationType': PublicNumberPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; + 'operationType': PublicNumberPropertyOperationOperationTypeEnum; 'value': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicNumberPropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", "type": "boolean", "format": "" }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicNumberPropertyOperationOperationTypeEnum", + "format": "" + }, { "name": "value", "baseName": "value", "type": "number", "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicObjectList.ts b/codegen/crm/lists/models/PublicObjectList.ts index b13ffcc8e..b40b14cbb 100644 --- a/codegen/crm/lists/models/PublicObjectList.ts +++ b/codegen/crm/lists/models/PublicObjectList.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,9 +12,6 @@ import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; -/** -* An object list definition. -*/ export class PublicObjectList { /** * The processing type of the list. @@ -27,7 +24,7 @@ export class PublicObjectList { /** * The ID of the user that last updated the list. */ - 'updatedById'?: number; + 'updatedById'?: string; /** * The time when the filters for this list were last updated. */ @@ -35,7 +32,7 @@ export class PublicObjectList { /** * The **ILS ID** of the list. */ - 'listId': number; + 'listId': string; /** * The time when the list was created. */ @@ -52,6 +49,7 @@ export class PublicObjectList { * The version of the list. */ 'listVersion': number; + 'size'?: number; /** * The name of the list. */ @@ -59,7 +57,7 @@ export class PublicObjectList { /** * The ID of the user that created the list. */ - 'createdById'?: number; + 'createdById'?: string; 'filterBranch'?: PublicPropertyAssociationFilterBranchFilterBranchesInner; /** * The time the list was last updated. @@ -84,8 +82,8 @@ export class PublicObjectList { { "name": "updatedById", "baseName": "updatedById", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "filtersUpdatedAt", @@ -96,8 +94,8 @@ export class PublicObjectList { { "name": "listId", "baseName": "listId", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "createdAt", @@ -123,6 +121,12 @@ export class PublicObjectList { "type": "number", "format": "int32" }, + { + "name": "size", + "baseName": "size", + "type": "number", + "format": "int64" + }, { "name": "name", "baseName": "name", @@ -132,8 +136,8 @@ export class PublicObjectList { { "name": "createdById", "baseName": "createdById", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "filterBranch", diff --git a/codegen/crm/lists/models/PublicObjectListSearchResult.ts b/codegen/crm/lists/models/PublicObjectListSearchResult.ts index 173684b12..bece42aa1 100644 --- a/codegen/crm/lists/models/PublicObjectListSearchResult.ts +++ b/codegen/crm/lists/models/PublicObjectListSearchResult.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -23,7 +23,7 @@ export class PublicObjectListSearchResult { /** * The ID of the user that last updated the list. */ - 'updatedById'?: number; + 'updatedById'?: string; /** * The time when the filters for this list were last updated. */ @@ -31,7 +31,7 @@ export class PublicObjectListSearchResult { /** * The **ILS ID** of the list. */ - 'listId': number; + 'listId': string; /** * The time when the list was created. */ @@ -59,7 +59,7 @@ export class PublicObjectListSearchResult { /** * The ID of the user that created the list. */ - 'createdById'?: number; + 'createdById'?: string; /** * The time the list was last updated. */ @@ -83,8 +83,8 @@ export class PublicObjectListSearchResult { { "name": "updatedById", "baseName": "updatedById", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "filtersUpdatedAt", @@ -95,8 +95,8 @@ export class PublicObjectListSearchResult { { "name": "listId", "baseName": "listId", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "createdAt", @@ -137,8 +137,8 @@ export class PublicObjectListSearchResult { { "name": "createdById", "baseName": "createdById", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { "name": "updatedAt", diff --git a/codegen/crm/lists/models/PublicOrFilterBranch.ts b/codegen/crm/lists/models/PublicOrFilterBranch.ts index dcbeb4df2..84c10f6a6 100644 --- a/codegen/crm/lists/models/PublicOrFilterBranch.ts +++ b/codegen/crm/lists/models/PublicOrFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -16,8 +16,8 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicOrFilterBranch { 'filterBranchType': PublicOrFilterBranchFilterBranchTypeEnum; 'filterBranches': Array; - 'filters': Array; 'filterBranchOperator': string; + 'filters': Array; static readonly discriminator: string | undefined = undefined; @@ -34,17 +34,17 @@ export class PublicOrFilterBranch { "type": "Array", "format": "" }, - { - "name": "filters", - "baseName": "filters", - "type": "Array", - "format": "" - }, { "name": "filterBranchOperator", "baseName": "filterBranchOperator", "type": "string", "format": "" + }, + { + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicPageViewAnalyticsFilter.ts b/codegen/crm/lists/models/PublicPageViewAnalyticsFilter.ts index 5a0e22575..0935d00fa 100644 --- a/codegen/crm/lists/models/PublicPageViewAnalyticsFilter.ts +++ b/codegen/crm/lists/models/PublicPageViewAnalyticsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,52 +10,52 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicPageViewAnalyticsFilter { - 'filterType': PublicPageViewAnalyticsFilterFilterTypeEnum; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': string; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'enableTracking'?: boolean; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'pageUrl': string; + 'filterType': PublicPageViewAnalyticsFilterFilterTypeEnum; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicPageViewAnalyticsFilterFilterTypeEnum", + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "enableTracking", + "baseName": "enableTracking", + "type": "boolean", "format": "" }, { "name": "pruningRefineBy", "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "pageUrl", + "baseName": "pageUrl", "type": "string", "format": "" }, { - "name": "enableTracking", - "baseName": "enableTracking", - "type": "boolean", + "name": "filterType", + "baseName": "filterType", + "type": "PublicPageViewAnalyticsFilterFilterTypeEnum", "format": "" }, { - "name": "pageUrl", - "baseName": "pageUrl", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicPrivacyAnalyticsFilter.ts b/codegen/crm/lists/models/PublicPrivacyAnalyticsFilter.ts index b09d62ded..2c94c078d 100644 --- a/codegen/crm/lists/models/PublicPrivacyAnalyticsFilter.ts +++ b/codegen/crm/lists/models/PublicPrivacyAnalyticsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,25 +12,25 @@ export class PublicPrivacyAnalyticsFilter { - 'filterType': PublicPrivacyAnalyticsFilterFilterTypeEnum; 'privacyName': string; + 'filterType': PublicPrivacyAnalyticsFilterFilterTypeEnum; 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicPrivacyAnalyticsFilterFilterTypeEnum", - "format": "" - }, { "name": "privacyName", "baseName": "privacyName", "type": "string", "format": "" }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicPrivacyAnalyticsFilterFilterTypeEnum", + "format": "" + }, { "name": "operator", "baseName": "operator", diff --git a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranch.ts b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranch.ts index 57e03319a..ca9f03320 100644 --- a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranch.ts +++ b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -15,12 +15,12 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicPropertyAssociationFilterBranch { 'filterBranchType': PublicPropertyAssociationFilterBranchFilterBranchTypeEnum; - 'filterBranchOperator': string; 'filterBranches': Array; - 'filters': Array; 'objectTypeId': string; - 'operator': string; + 'filterBranchOperator': string; + 'filters': Array; 'propertyWithObjectId': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; @@ -32,15 +32,21 @@ export class PublicPropertyAssociationFilterBranch { "format": "" }, { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", + "name": "filterBranches", + "baseName": "filterBranches", + "type": "Array", + "format": "" + }, + { + "name": "objectTypeId", + "baseName": "objectTypeId", "type": "string", "format": "" }, { - "name": "filterBranches", - "baseName": "filterBranches", - "type": "Array", + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", + "type": "string", "format": "" }, { @@ -50,8 +56,8 @@ export class PublicPropertyAssociationFilterBranch { "format": "" }, { - "name": "objectTypeId", - "baseName": "objectTypeId", + "name": "propertyWithObjectId", + "baseName": "propertyWithObjectId", "type": "string", "format": "" }, @@ -60,12 +66,6 @@ export class PublicPropertyAssociationFilterBranch { "baseName": "operator", "type": "string", "format": "" - }, - { - "name": "propertyWithObjectId", - "baseName": "propertyWithObjectId", - "type": "string", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFilterBranchesInner.ts b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFilterBranchesInner.ts index a66d85cf2..336879c7b 100644 --- a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFilterBranchesInner.ts +++ b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFilterBranchesInner.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,14 +10,16 @@ * Do not edit the class manually. */ +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/PublicPropertyAssociationFilterBranchFiltersInner'; export class PublicPropertyAssociationFilterBranchFilterBranchesInner { 'filterBranchType': PublicPropertyAssociationFilterBranchFilterBranchesInnerFilterBranchTypeEnum; 'filterBranches': Array; - 'filters': Array; 'filterBranchOperator': string; + 'filters': Array; 'eventTypeId': string; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'operator': string; 'objectTypeId': string; 'propertyWithObjectId': string; @@ -39,6 +41,12 @@ export class PublicPropertyAssociationFilterBranchFilterBranchesInner { "type": "Array", "format": "" }, + { + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", + "type": "string", + "format": "" + }, { "name": "filters", "baseName": "filters", @@ -46,15 +54,15 @@ export class PublicPropertyAssociationFilterBranchFilterBranchesInner { "format": "" }, { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", + "name": "eventTypeId", + "baseName": "eventTypeId", "type": "string", "format": "" }, { - "name": "eventTypeId", - "baseName": "eventTypeId", - "type": "string", + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { diff --git a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFiltersInner.ts b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFiltersInner.ts index ea4b56f93..16d57b4b1 100644 --- a/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFiltersInner.ts +++ b/codegen/crm/lists/models/PublicPropertyAssociationFilterBranchFiltersInner.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,24 +10,24 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; import { PublicEventFilterMetadata } from '../models/PublicEventFilterMetadata'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; import { PublicInListFilterMetadata } from '../models/PublicInListFilterMetadata'; -import { PublicPropertyFilterOperation } from '../models/PublicPropertyFilterOperation'; +import { PublicSurveyMonkeyValueFilterValueComparison } from '../models/PublicSurveyMonkeyValueFilterValueComparison'; export class PublicPropertyAssociationFilterBranchFiltersInner { - 'filterType': PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum; 'property': string; - 'operation': PublicPropertyFilterOperation; - 'coalescingRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': string; - 'listId': number; - 'toObjectTypeId'?: string; + 'filterType': PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum; + 'operation': PublicSurveyMonkeyValueFilterValueComparison; + 'listId': string; + 'coalescingRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; + 'toObjectType'?: string; 'associationTypeId': number; 'associationCategory': string; - 'toObjectType'?: string; - 'pruningRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; + 'toObjectTypeId'?: string; + 'operator': string; 'enableTracking'?: boolean; + 'pruningRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; 'pageUrl': string; 'ctaName': string; 'eventId': string; @@ -35,28 +35,28 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { 'pageId': string; 'eventTypeId': string; 'filterLines': Array; - 'subscriptionIds': Array; - 'acceptedStatuses': Array; 'subscriptionType': string; + 'subscriptionIds': Array; + 'acceptedStatuses': Array; 'channel': string; 'acceptedOptStates': Array; - 'businessUnitId'?: number; + 'businessUnitId'?: string; 'campaignId': string; 'surveyId': string; + 'valueComparison': PublicSurveyMonkeyValueFilterValueComparison; 'surveyQuestion': string; 'surveyAnswerRowId'?: string; 'surveyAnswerColId'?: string; - 'valueComparison': PublicPropertyFilterOperation; 'webinarId'?: string; - 'level': string; - 'emailId': number; - 'appId': number; 'clickUrl'?: string; + 'level': string; + 'appId': string; + 'emailId': string; 'privacyName': string; - 'entityType': string; - 'searchTermType': string; 'searchTerms': Array; + 'entityType': string; 'adNetwork': string; + 'searchTermType': string; 'metadata'?: PublicInListFilterMetadata; 'propertyWithObjectId': string; 'shouldAccept': boolean; @@ -65,12 +65,6 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum", - "format": "" - }, { "name": "property", "baseName": "property", @@ -78,32 +72,32 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "format": "" }, { - "name": "operation", - "baseName": "operation", - "type": "PublicPropertyFilterOperation", + "name": "filterType", + "baseName": "filterType", + "type": "PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum", "format": "" }, { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "operation", + "baseName": "operation", + "type": "PublicSurveyMonkeyValueFilterValueComparison", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "listId", + "baseName": "listId", "type": "string", "format": "" }, { - "name": "listId", - "baseName": "listId", - "type": "number", - "format": "int32" + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", + "format": "" }, { - "name": "toObjectTypeId", - "baseName": "toObjectTypeId", + "name": "toObjectType", + "baseName": "toObjectType", "type": "string", "format": "" }, @@ -120,15 +114,15 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "format": "" }, { - "name": "toObjectType", - "baseName": "toObjectType", + "name": "toObjectTypeId", + "baseName": "toObjectTypeId", "type": "string", "format": "" }, { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "name": "operator", + "baseName": "operator", + "type": "string", "format": "" }, { @@ -137,6 +131,12 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "type": "boolean", "format": "" }, + { + "name": "pruningRefineBy", + "baseName": "pruningRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", + "format": "" + }, { "name": "pageUrl", "baseName": "pageUrl", @@ -179,11 +179,17 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "type": "Array", "format": "" }, + { + "name": "subscriptionType", + "baseName": "subscriptionType", + "type": "string", + "format": "" + }, { "name": "subscriptionIds", "baseName": "subscriptionIds", - "type": "Array", - "format": "int64" + "type": "Array", + "format": "" }, { "name": "acceptedStatuses", @@ -191,12 +197,6 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "type": "Array", "format": "" }, - { - "name": "subscriptionType", - "baseName": "subscriptionType", - "type": "string", - "format": "" - }, { "name": "channel", "baseName": "channel", @@ -212,8 +212,8 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { { "name": "businessUnitId", "baseName": "businessUnitId", - "type": "number", - "format": "int64" + "type": "string", + "format": "" }, { "name": "campaignId", @@ -227,6 +227,12 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "type": "string", "format": "" }, + { + "name": "valueComparison", + "baseName": "valueComparison", + "type": "PublicSurveyMonkeyValueFilterValueComparison", + "format": "" + }, { "name": "surveyQuestion", "baseName": "surveyQuestion", @@ -246,14 +252,14 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "format": "" }, { - "name": "valueComparison", - "baseName": "valueComparison", - "type": "PublicPropertyFilterOperation", + "name": "webinarId", + "baseName": "webinarId", + "type": "string", "format": "" }, { - "name": "webinarId", - "baseName": "webinarId", + "name": "clickUrl", + "baseName": "clickUrl", "type": "string", "format": "" }, @@ -263,21 +269,15 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "type": "string", "format": "" }, - { - "name": "emailId", - "baseName": "emailId", - "type": "number", - "format": "int32" - }, { "name": "appId", "baseName": "appId", - "type": "number", - "format": "int32" + "type": "string", + "format": "" }, { - "name": "clickUrl", - "baseName": "clickUrl", + "name": "emailId", + "baseName": "emailId", "type": "string", "format": "" }, @@ -288,26 +288,26 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { "format": "" }, { - "name": "entityType", - "baseName": "entityType", - "type": "string", + "name": "searchTerms", + "baseName": "searchTerms", + "type": "Array", "format": "" }, { - "name": "searchTermType", - "baseName": "searchTermType", + "name": "entityType", + "baseName": "entityType", "type": "string", "format": "" }, { - "name": "searchTerms", - "baseName": "searchTerms", - "type": "Array", + "name": "adNetwork", + "baseName": "adNetwork", + "type": "string", "format": "" }, { - "name": "adNetwork", - "baseName": "adNetwork", + "name": "searchTermType", + "baseName": "searchTermType", "type": "string", "format": "" }, @@ -346,6 +346,6 @@ export class PublicPropertyAssociationFilterBranchFiltersInner { export enum PublicPropertyAssociationFilterBranchFiltersInnerFilterTypeEnum { - UnifiedEventsInList = 'UNIFIED_EVENTS_IN_LIST' + Constant = 'CONSTANT' } diff --git a/codegen/crm/lists/models/PublicPropertyAssociationInListFilter.ts b/codegen/crm/lists/models/PublicPropertyAssociationInListFilter.ts index abe48088e..bfe1ee887 100644 --- a/codegen/crm/lists/models/PublicPropertyAssociationInListFilter.ts +++ b/codegen/crm/lists/models/PublicPropertyAssociationInListFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,42 +10,42 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicPropertyAssociationInListFilter { + 'listId': string; + 'coalescingRefineBy': PublicFormSubmissionFilterCoalescingRefineBy; + 'propertyWithObjectId': string; 'filterType': PublicPropertyAssociationInListFilterFilterTypeEnum; - 'coalescingRefineBy': PublicEventAnalyticsFilterCoalescingRefineBy; - 'operator': string; - 'listId': number; 'toObjectTypeId'?: string; - 'propertyWithObjectId': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicPropertyAssociationInListFilterFilterTypeEnum", + "name": "listId", + "baseName": "listId", + "type": "string", "format": "" }, { "name": "coalescingRefineBy", "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "propertyWithObjectId", + "baseName": "propertyWithObjectId", "type": "string", "format": "" }, { - "name": "listId", - "baseName": "listId", - "type": "number", - "format": "int32" + "name": "filterType", + "baseName": "filterType", + "type": "PublicPropertyAssociationInListFilterFilterTypeEnum", + "format": "" }, { "name": "toObjectTypeId", @@ -54,8 +54,8 @@ export class PublicPropertyAssociationInListFilter { "format": "" }, { - "name": "propertyWithObjectId", - "baseName": "propertyWithObjectId", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicPropertyFilter.ts b/codegen/crm/lists/models/PublicPropertyFilter.ts index df1653389..8c3783f31 100644 --- a/codegen/crm/lists/models/PublicPropertyFilter.ts +++ b/codegen/crm/lists/models/PublicPropertyFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,32 +10,32 @@ * Do not edit the class manually. */ -import { PublicPropertyFilterOperation } from '../models/PublicPropertyFilterOperation'; +import { PublicSurveyMonkeyValueFilterValueComparison } from '../models/PublicSurveyMonkeyValueFilterValueComparison'; export class PublicPropertyFilter { - 'filterType': PublicPropertyFilterFilterTypeEnum; 'property': string; - 'operation': PublicPropertyFilterOperation; + 'filterType': PublicPropertyFilterFilterTypeEnum; + 'operation': PublicSurveyMonkeyValueFilterValueComparison; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicPropertyFilterFilterTypeEnum", - "format": "" - }, { "name": "property", "baseName": "property", "type": "string", "format": "" }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicPropertyFilterFilterTypeEnum", + "format": "" + }, { "name": "operation", "baseName": "operation", - "type": "PublicPropertyFilterOperation", + "type": "PublicSurveyMonkeyValueFilterValueComparison", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicPropertyReferencedTime.ts b/codegen/crm/lists/models/PublicPropertyReferencedTime.ts index a300ed7f2..51d07a3a8 100644 --- a/codegen/crm/lists/models/PublicPropertyReferencedTime.ts +++ b/codegen/crm/lists/models/PublicPropertyReferencedTime.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,21 +12,15 @@ export class PublicPropertyReferencedTime { - 'timeType': PublicPropertyReferencedTimeTimeTypeEnum; 'timezoneSource'?: string; - 'zoneId': string; 'property': string; + 'timeType': PublicPropertyReferencedTimeTimeTypeEnum; + 'zoneId': string; 'referenceType': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "timeType", - "baseName": "timeType", - "type": "PublicPropertyReferencedTimeTimeTypeEnum", - "format": "" - }, { "name": "timezoneSource", "baseName": "timezoneSource", @@ -34,14 +28,20 @@ export class PublicPropertyReferencedTime { "format": "" }, { - "name": "zoneId", - "baseName": "zoneId", + "name": "property", + "baseName": "property", "type": "string", "format": "" }, { - "name": "property", - "baseName": "property", + "name": "timeType", + "baseName": "timeType", + "type": "PublicPropertyReferencedTimeTimeTypeEnum", + "format": "" + }, + { + "name": "zoneId", + "baseName": "zoneId", "type": "string", "format": "" }, diff --git a/codegen/crm/lists/models/PublicQuarterReference.ts b/codegen/crm/lists/models/PublicQuarterReference.ts index 0c18fb2aa..367ca0b8c 100644 --- a/codegen/crm/lists/models/PublicQuarterReference.ts +++ b/codegen/crm/lists/models/PublicQuarterReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,23 +12,17 @@ export class PublicQuarterReference { - 'referenceType': PublicQuarterReferenceReferenceTypeEnum; 'hour'?: number; - 'minute'?: number; - 'second'?: number; - 'millisecond'?: number; 'month': number; + 'millisecond'?: number; + 'referenceType': PublicQuarterReferenceReferenceTypeEnum; 'day': number; + 'minute'?: number; + 'second'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicQuarterReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -36,32 +30,38 @@ export class PublicQuarterReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "month", + "baseName": "month", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicQuarterReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, { - "name": "month", - "baseName": "month", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "day", - "baseName": "day", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicRangedDatePropertyOperation.ts b/codegen/crm/lists/models/PublicRangedDatePropertyOperation.ts index 45593b82b..bcffd1087 100644 --- a/codegen/crm/lists/models/PublicRangedDatePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicRangedDatePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,28 +12,16 @@ export class PublicRangedDatePropertyOperation { - 'operationType': PublicRangedDatePropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; 'upperBound': number; - 'lowerBound': number; 'requiresTimeZoneConversion': boolean; + 'operationType': PublicRangedDatePropertyOperationOperationTypeEnum; + 'lowerBound': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicRangedDatePropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", @@ -46,6 +34,18 @@ export class PublicRangedDatePropertyOperation { "type": "number", "format": "int32" }, + { + "name": "requiresTimeZoneConversion", + "baseName": "requiresTimeZoneConversion", + "type": "boolean", + "format": "" + }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicRangedDatePropertyOperationOperationTypeEnum", + "format": "" + }, { "name": "lowerBound", "baseName": "lowerBound", @@ -53,9 +53,9 @@ export class PublicRangedDatePropertyOperation { "format": "int32" }, { - "name": "requiresTimeZoneConversion", - "baseName": "requiresTimeZoneConversion", - "type": "boolean", + "name": "operator", + "baseName": "operator", + "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicRangedNumberPropertyOperation.ts b/codegen/crm/lists/models/PublicRangedNumberPropertyOperation.ts index 9a7cfc3cd..46e0fa730 100644 --- a/codegen/crm/lists/models/PublicRangedNumberPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicRangedNumberPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,27 +12,15 @@ export class PublicRangedNumberPropertyOperation { - 'operationType': PublicRangedNumberPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; 'upperBound': number; + 'operationType': PublicRangedNumberPropertyOperationOperationTypeEnum; 'lowerBound': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicRangedNumberPropertyOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", @@ -45,11 +33,23 @@ export class PublicRangedNumberPropertyOperation { "type": "number", "format": "int32" }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicRangedNumberPropertyOperationOperationTypeEnum", + "format": "" + }, { "name": "lowerBound", "baseName": "lowerBound", "type": "number", "format": "int32" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicRangedTimeOperation.ts b/codegen/crm/lists/models/PublicRangedTimeOperation.ts index fc1eb1dbc..21568c82a 100644 --- a/codegen/crm/lists/models/PublicRangedTimeOperation.ts +++ b/codegen/crm/lists/models/PublicRangedTimeOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,28 +13,22 @@ import { PublicTimePointOperationTimePoint } from '../models/PublicTimePointOperationTimePoint'; export class PublicRangedTimeOperation { - 'type': PublicRangedTimeOperationTypeEnum; - 'operator': string; - 'includeObjectsWithNoValueSet': boolean; - 'lowerBoundEndpointBehavior'?: string; 'upperBoundEndpointBehavior'?: string; - 'propertyParser'?: string; - 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; + 'includeObjectsWithNoValueSet': boolean; 'upperBoundTimePoint': PublicTimePointOperationTimePoint; + 'propertyParser'?: string; 'operationType': string; + 'type': PublicRangedTimeOperationTypeEnum; + 'lowerBoundEndpointBehavior'?: string; + 'operator': string; + 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "type", - "baseName": "type", - "type": "PublicRangedTimeOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", + "name": "upperBoundEndpointBehavior", + "baseName": "upperBoundEndpointBehavior", "type": "string", "format": "" }, @@ -45,40 +39,46 @@ export class PublicRangedTimeOperation { "format": "" }, { - "name": "lowerBoundEndpointBehavior", - "baseName": "lowerBoundEndpointBehavior", - "type": "string", + "name": "upperBoundTimePoint", + "baseName": "upperBoundTimePoint", + "type": "PublicTimePointOperationTimePoint", "format": "" }, { - "name": "upperBoundEndpointBehavior", - "baseName": "upperBoundEndpointBehavior", + "name": "propertyParser", + "baseName": "propertyParser", "type": "string", "format": "" }, { - "name": "propertyParser", - "baseName": "propertyParser", + "name": "operationType", + "baseName": "operationType", "type": "string", "format": "" }, { - "name": "lowerBoundTimePoint", - "baseName": "lowerBoundTimePoint", - "type": "PublicTimePointOperationTimePoint", + "name": "type", + "baseName": "type", + "type": "PublicRangedTimeOperationTypeEnum", "format": "" }, { - "name": "upperBoundTimePoint", - "baseName": "upperBoundTimePoint", - "type": "PublicTimePointOperationTimePoint", + "name": "lowerBoundEndpointBehavior", + "baseName": "lowerBoundEndpointBehavior", + "type": "string", "format": "" }, { - "name": "operationType", - "baseName": "operationType", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" + }, + { + "name": "lowerBoundTimePoint", + "baseName": "lowerBoundTimePoint", + "type": "PublicTimePointOperationTimePoint", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicRelativeComparativeTimestampRefineBy.ts b/codegen/crm/lists/models/PublicRelativeComparativeTimestampRefineBy.ts index 56cc9fa8c..8a368ad1e 100644 --- a/codegen/crm/lists/models/PublicRelativeComparativeTimestampRefineBy.ts +++ b/codegen/crm/lists/models/PublicRelativeComparativeTimestampRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,19 +13,13 @@ import { PublicTimeOffset } from '../models/PublicTimeOffset'; export class PublicRelativeComparativeTimestampRefineBy { - 'type': PublicRelativeComparativeTimestampRefineByTypeEnum; 'comparison': string; 'timeOffset': PublicTimeOffset; + 'type': PublicRelativeComparativeTimestampRefineByTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "PublicRelativeComparativeTimestampRefineByTypeEnum", - "format": "" - }, { "name": "comparison", "baseName": "comparison", @@ -37,6 +31,12 @@ export class PublicRelativeComparativeTimestampRefineBy { "baseName": "timeOffset", "type": "PublicTimeOffset", "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "PublicRelativeComparativeTimestampRefineByTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicRelativeRangedTimestampRefineBy.ts b/codegen/crm/lists/models/PublicRelativeRangedTimestampRefineBy.ts index fa48ca8b2..6dc2e64a1 100644 --- a/codegen/crm/lists/models/PublicRelativeRangedTimestampRefineBy.ts +++ b/codegen/crm/lists/models/PublicRelativeRangedTimestampRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,18 +13,18 @@ import { PublicTimeOffset } from '../models/PublicTimeOffset'; export class PublicRelativeRangedTimestampRefineBy { - 'type': PublicRelativeRangedTimestampRefineByTypeEnum; - 'rangeType': string; 'upperBoundOffset': PublicTimeOffset; + 'rangeType': string; 'lowerBoundOffset': PublicTimeOffset; + 'type': PublicRelativeRangedTimestampRefineByTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "type", - "baseName": "type", - "type": "PublicRelativeRangedTimestampRefineByTypeEnum", + "name": "upperBoundOffset", + "baseName": "upperBoundOffset", + "type": "PublicTimeOffset", "format": "" }, { @@ -34,15 +34,15 @@ export class PublicRelativeRangedTimestampRefineBy { "format": "" }, { - "name": "upperBoundOffset", - "baseName": "upperBoundOffset", + "name": "lowerBoundOffset", + "baseName": "lowerBoundOffset", "type": "PublicTimeOffset", "format": "" }, { - "name": "lowerBoundOffset", - "baseName": "lowerBoundOffset", - "type": "PublicTimeOffset", + "name": "type", + "baseName": "type", + "type": "PublicRelativeRangedTimestampRefineByTypeEnum", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicRestrictedFilterBranch.ts b/codegen/crm/lists/models/PublicRestrictedFilterBranch.ts index d7506335a..4830e3011 100644 --- a/codegen/crm/lists/models/PublicRestrictedFilterBranch.ts +++ b/codegen/crm/lists/models/PublicRestrictedFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -15,8 +15,8 @@ import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/Pub export class PublicRestrictedFilterBranch { 'filterBranchType': PublicRestrictedFilterBranchFilterBranchTypeEnum; - 'filterBranchOperator': string; 'filterBranches': Array; + 'filterBranchOperator': string; 'filters': Array; static readonly discriminator: string | undefined = undefined; @@ -28,18 +28,18 @@ export class PublicRestrictedFilterBranch { "type": "PublicRestrictedFilterBranchFilterBranchTypeEnum", "format": "" }, - { - "name": "filterBranchOperator", - "baseName": "filterBranchOperator", - "type": "string", - "format": "" - }, { "name": "filterBranches", "baseName": "filterBranches", "type": "Array", "format": "" }, + { + "name": "filterBranchOperator", + "baseName": "filterBranchOperator", + "type": "string", + "format": "" + }, { "name": "filters", "baseName": "filters", diff --git a/codegen/crm/lists/models/PublicRollingDateRangePropertyOperation.ts b/codegen/crm/lists/models/PublicRollingDateRangePropertyOperation.ts index 358562d01..f738da84e 100644 --- a/codegen/crm/lists/models/PublicRollingDateRangePropertyOperation.ts +++ b/codegen/crm/lists/models/PublicRollingDateRangePropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,31 +12,31 @@ export class PublicRollingDateRangePropertyOperation { - 'operationType': PublicRollingDateRangePropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; - 'numberOfDays': number; 'requiresTimeZoneConversion': boolean; + 'operationType': PublicRollingDateRangePropertyOperationOperationTypeEnum; + 'numberOfDays': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicRollingDateRangePropertyOperationOperationTypeEnum", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "string", + "name": "requiresTimeZoneConversion", + "baseName": "requiresTimeZoneConversion", + "type": "boolean", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", + "name": "operationType", + "baseName": "operationType", + "type": "PublicRollingDateRangePropertyOperationOperationTypeEnum", "format": "" }, { @@ -46,9 +46,9 @@ export class PublicRollingDateRangePropertyOperation { "format": "int32" }, { - "name": "requiresTimeZoneConversion", - "baseName": "requiresTimeZoneConversion", - "type": "boolean", + "name": "operator", + "baseName": "operator", + "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicRollingPropertyUpdatedOperation.ts b/codegen/crm/lists/models/PublicRollingPropertyUpdatedOperation.ts index 87d542e0a..969722d49 100644 --- a/codegen/crm/lists/models/PublicRollingPropertyUpdatedOperation.ts +++ b/codegen/crm/lists/models/PublicRollingPropertyUpdatedOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,37 +12,37 @@ export class PublicRollingPropertyUpdatedOperation { - 'operationType': PublicRollingPropertyUpdatedOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; + 'operationType': PublicRollingPropertyUpdatedOperationOperationTypeEnum; 'numberOfDays': number; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "operationType", - "baseName": "operationType", - "type": "PublicRollingPropertyUpdatedOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string", - "format": "" - }, { "name": "includeObjectsWithNoValueSet", "baseName": "includeObjectsWithNoValueSet", "type": "boolean", "format": "" }, + { + "name": "operationType", + "baseName": "operationType", + "type": "PublicRollingPropertyUpdatedOperationOperationTypeEnum", + "format": "" + }, { "name": "numberOfDays", "baseName": "numberOfDays", "type": "number", "format": "int32" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicSetOccurrencesRefineBy.ts b/codegen/crm/lists/models/PublicSetOccurrencesRefineBy.ts index 0701b3274..9b44c26fb 100644 --- a/codegen/crm/lists/models/PublicSetOccurrencesRefineBy.ts +++ b/codegen/crm/lists/models/PublicSetOccurrencesRefineBy.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/lists/models/PublicStringPropertyOperation.ts b/codegen/crm/lists/models/PublicStringPropertyOperation.ts index dac5be656..b450bb9bd 100644 --- a/codegen/crm/lists/models/PublicStringPropertyOperation.ts +++ b/codegen/crm/lists/models/PublicStringPropertyOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,14 +12,20 @@ export class PublicStringPropertyOperation { - 'operationType': PublicStringPropertyOperationOperationTypeEnum; - 'operator': string; 'includeObjectsWithNoValueSet': boolean; + 'operationType': PublicStringPropertyOperationOperationTypeEnum; 'value': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", + "format": "" + }, { "name": "operationType", "baseName": "operationType", @@ -27,20 +33,14 @@ export class PublicStringPropertyOperation { "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "value", + "baseName": "value", "type": "string", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", - "format": "" - }, - { - "name": "value", - "baseName": "value", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" } ]; diff --git a/codegen/crm/lists/models/PublicSurveyMonkeyFilter.ts b/codegen/crm/lists/models/PublicSurveyMonkeyFilter.ts index bd729520e..1b5165576 100644 --- a/codegen/crm/lists/models/PublicSurveyMonkeyFilter.ts +++ b/codegen/crm/lists/models/PublicSurveyMonkeyFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,25 +12,25 @@ export class PublicSurveyMonkeyFilter { - 'filterType': PublicSurveyMonkeyFilterFilterTypeEnum; 'surveyId': string; + 'filterType': PublicSurveyMonkeyFilterFilterTypeEnum; 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicSurveyMonkeyFilterFilterTypeEnum", - "format": "" - }, { "name": "surveyId", "baseName": "surveyId", "type": "string", "format": "" }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicSurveyMonkeyFilterFilterTypeEnum", + "format": "" + }, { "name": "operator", "baseName": "operator", diff --git a/codegen/crm/lists/models/PublicSurveyMonkeyValueFilter.ts b/codegen/crm/lists/models/PublicSurveyMonkeyValueFilter.ts index 5ce963292..3994145bc 100644 --- a/codegen/crm/lists/models/PublicSurveyMonkeyValueFilter.ts +++ b/codegen/crm/lists/models/PublicSurveyMonkeyValueFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,24 +10,24 @@ * Do not edit the class manually. */ -import { PublicPropertyFilterOperation } from '../models/PublicPropertyFilterOperation'; +import { PublicSurveyMonkeyValueFilterValueComparison } from '../models/PublicSurveyMonkeyValueFilterValueComparison'; export class PublicSurveyMonkeyValueFilter { - 'filterType': PublicSurveyMonkeyValueFilterFilterTypeEnum; + 'valueComparison': PublicSurveyMonkeyValueFilterValueComparison; 'surveyId': string; 'surveyQuestion': string; + 'filterType': PublicSurveyMonkeyValueFilterFilterTypeEnum; 'surveyAnswerRowId'?: string; 'surveyAnswerColId'?: string; - 'valueComparison': PublicPropertyFilterOperation; 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "filterType", - "baseName": "filterType", - "type": "PublicSurveyMonkeyValueFilterFilterTypeEnum", + "name": "valueComparison", + "baseName": "valueComparison", + "type": "PublicSurveyMonkeyValueFilterValueComparison", "format": "" }, { @@ -42,6 +42,12 @@ export class PublicSurveyMonkeyValueFilter { "type": "string", "format": "" }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicSurveyMonkeyValueFilterFilterTypeEnum", + "format": "" + }, { "name": "surveyAnswerRowId", "baseName": "surveyAnswerRowId", @@ -54,12 +60,6 @@ export class PublicSurveyMonkeyValueFilter { "type": "string", "format": "" }, - { - "name": "valueComparison", - "baseName": "valueComparison", - "type": "PublicPropertyFilterOperation", - "format": "" - }, { "name": "operator", "baseName": "operator", diff --git a/codegen/crm/lists/models/PublicPropertyFilterOperation.ts b/codegen/crm/lists/models/PublicSurveyMonkeyValueFilterValueComparison.ts similarity index 92% rename from codegen/crm/lists/models/PublicPropertyFilterOperation.ts rename to codegen/crm/lists/models/PublicSurveyMonkeyValueFilterValueComparison.ts index bc3f5dc8e..fd8d18b9a 100644 --- a/codegen/crm/lists/models/PublicPropertyFilterOperation.ts +++ b/codegen/crm/lists/models/PublicSurveyMonkeyValueFilterValueComparison.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,59 +12,59 @@ import { PublicTimePointOperationTimePoint } from '../models/PublicTimePointOperationTimePoint'; -export class PublicPropertyFilterOperation { - 'operationType': string; - 'operator': string; +export class PublicSurveyMonkeyValueFilterValueComparison { 'includeObjectsWithNoValueSet': boolean; + 'operationType': string; 'value': string; + 'operator': string; 'requiresTimeZoneConversion': boolean; 'timestamp': number; 'upperBound': number; 'lowerBound': number; - 'comparisonPropertyName': string; 'defaultComparisonValue'?: string; + 'comparisonPropertyName': string; 'numberOfDays': number; 'values': Array; - 'year': number; 'month': string; + 'year': number; 'day': number; - 'timeUnit': string; - 'fiscalYearStart'?: PublicPropertyFilterOperationFiscalYearStartEnum; 'useFiscalYear'?: boolean; + 'fiscalYearStart'?: PublicSurveyMonkeyValueFilterValueComparisonFiscalYearStartEnum; 'timeUnitCount'?: number; - 'timePoint': PublicTimePointOperationTimePoint; + 'timeUnit': string; 'endpointBehavior'?: string; 'propertyParser'?: string; + 'timePoint': PublicTimePointOperationTimePoint; 'type': string; - 'lowerBoundEndpointBehavior'?: string; 'upperBoundEndpointBehavior'?: string; - 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; 'upperBoundTimePoint': PublicTimePointOperationTimePoint; + 'lowerBoundEndpointBehavior'?: string; + 'lowerBoundTimePoint': PublicTimePointOperationTimePoint; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "string", + "name": "includeObjectsWithNoValueSet", + "baseName": "includeObjectsWithNoValueSet", + "type": "boolean", "format": "" }, { - "name": "operator", - "baseName": "operator", + "name": "operationType", + "baseName": "operationType", "type": "string", "format": "" }, { - "name": "includeObjectsWithNoValueSet", - "baseName": "includeObjectsWithNoValueSet", - "type": "boolean", + "name": "value", + "baseName": "value", + "type": "string", "format": "" }, { - "name": "value", - "baseName": "value", + "name": "operator", + "baseName": "operator", "type": "string", "format": "" }, @@ -93,14 +93,14 @@ export class PublicPropertyFilterOperation { "format": "int32" }, { - "name": "comparisonPropertyName", - "baseName": "comparisonPropertyName", + "name": "defaultComparisonValue", + "baseName": "defaultComparisonValue", "type": "string", "format": "" }, { - "name": "defaultComparisonValue", - "baseName": "defaultComparisonValue", + "name": "comparisonPropertyName", + "baseName": "comparisonPropertyName", "type": "string", "format": "" }, @@ -116,18 +116,18 @@ export class PublicPropertyFilterOperation { "type": "Array", "format": "" }, - { - "name": "year", - "baseName": "year", - "type": "number", - "format": "int32" - }, { "name": "month", "baseName": "month", "type": "string", "format": "" }, + { + "name": "year", + "baseName": "year", + "type": "number", + "format": "int32" + }, { "name": "day", "baseName": "day", @@ -135,21 +135,15 @@ export class PublicPropertyFilterOperation { "format": "int32" }, { - "name": "timeUnit", - "baseName": "timeUnit", - "type": "string", + "name": "useFiscalYear", + "baseName": "useFiscalYear", + "type": "boolean", "format": "" }, { "name": "fiscalYearStart", "baseName": "fiscalYearStart", - "type": "PublicPropertyFilterOperationFiscalYearStartEnum", - "format": "" - }, - { - "name": "useFiscalYear", - "baseName": "useFiscalYear", - "type": "boolean", + "type": "PublicSurveyMonkeyValueFilterValueComparisonFiscalYearStartEnum", "format": "" }, { @@ -159,9 +153,9 @@ export class PublicPropertyFilterOperation { "format": "int32" }, { - "name": "timePoint", - "baseName": "timePoint", - "type": "PublicTimePointOperationTimePoint", + "name": "timeUnit", + "baseName": "timeUnit", + "type": "string", "format": "" }, { @@ -177,14 +171,14 @@ export class PublicPropertyFilterOperation { "format": "" }, { - "name": "type", - "baseName": "type", - "type": "string", + "name": "timePoint", + "baseName": "timePoint", + "type": "PublicTimePointOperationTimePoint", "format": "" }, { - "name": "lowerBoundEndpointBehavior", - "baseName": "lowerBoundEndpointBehavior", + "name": "type", + "baseName": "type", "type": "string", "format": "" }, @@ -195,20 +189,26 @@ export class PublicPropertyFilterOperation { "format": "" }, { - "name": "lowerBoundTimePoint", - "baseName": "lowerBoundTimePoint", + "name": "upperBoundTimePoint", + "baseName": "upperBoundTimePoint", "type": "PublicTimePointOperationTimePoint", "format": "" }, { - "name": "upperBoundTimePoint", - "baseName": "upperBoundTimePoint", + "name": "lowerBoundEndpointBehavior", + "baseName": "lowerBoundEndpointBehavior", + "type": "string", + "format": "" + }, + { + "name": "lowerBoundTimePoint", + "baseName": "lowerBoundTimePoint", "type": "PublicTimePointOperationTimePoint", "format": "" } ]; static getAttributeTypeMap() { - return PublicPropertyFilterOperation.attributeTypeMap; + return PublicSurveyMonkeyValueFilterValueComparison.attributeTypeMap; } public constructor() { @@ -216,7 +216,7 @@ export class PublicPropertyFilterOperation { } -export enum PublicPropertyFilterOperationFiscalYearStartEnum { +export enum PublicSurveyMonkeyValueFilterValueComparisonFiscalYearStartEnum { January = 'JANUARY', February = 'FEBRUARY', March = 'MARCH', diff --git a/codegen/crm/lists/models/PublicTimeOffset.ts b/codegen/crm/lists/models/PublicTimeOffset.ts index c548b86ff..4ddd449b6 100644 --- a/codegen/crm/lists/models/PublicTimeOffset.ts +++ b/codegen/crm/lists/models/PublicTimeOffset.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,13 +12,19 @@ export class PublicTimeOffset { + 'amount': number; 'offsetDirection': string; 'timeUnit': string; - 'amount': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number", + "format": "int64" + }, { "name": "offsetDirection", "baseName": "offsetDirection", @@ -30,12 +36,6 @@ export class PublicTimeOffset { "baseName": "timeUnit", "type": "string", "format": "" - }, - { - "name": "amount", - "baseName": "amount", - "type": "number", - "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicTimePointOperation.ts b/codegen/crm/lists/models/PublicTimePointOperation.ts index da5ff0dac..6b1771b77 100644 --- a/codegen/crm/lists/models/PublicTimePointOperation.ts +++ b/codegen/crm/lists/models/PublicTimePointOperation.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -13,26 +13,20 @@ import { PublicTimePointOperationTimePoint } from '../models/PublicTimePointOperationTimePoint'; export class PublicTimePointOperation { - 'operationType': PublicTimePointOperationOperationTypeEnum; - 'operator': string; - 'includeObjectsWithNoValueSet': boolean; - 'timePoint': PublicTimePointOperationTimePoint; 'endpointBehavior'?: string; + 'includeObjectsWithNoValueSet': boolean; 'propertyParser'?: string; + 'operationType': PublicTimePointOperationOperationTypeEnum; + 'timePoint': PublicTimePointOperationTimePoint; 'type': string; + 'operator': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "operationType", - "baseName": "operationType", - "type": "PublicTimePointOperationOperationTypeEnum", - "format": "" - }, - { - "name": "operator", - "baseName": "operator", + "name": "endpointBehavior", + "baseName": "endpointBehavior", "type": "string", "format": "" }, @@ -43,21 +37,21 @@ export class PublicTimePointOperation { "format": "" }, { - "name": "timePoint", - "baseName": "timePoint", - "type": "PublicTimePointOperationTimePoint", + "name": "propertyParser", + "baseName": "propertyParser", + "type": "string", "format": "" }, { - "name": "endpointBehavior", - "baseName": "endpointBehavior", - "type": "string", + "name": "operationType", + "baseName": "operationType", + "type": "PublicTimePointOperationOperationTypeEnum", "format": "" }, { - "name": "propertyParser", - "baseName": "propertyParser", - "type": "string", + "name": "timePoint", + "baseName": "timePoint", + "type": "PublicTimePointOperationTimePoint", "format": "" }, { @@ -65,6 +59,12 @@ export class PublicTimePointOperation { "baseName": "type", "type": "string", "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicTimePointOperationTimePoint.ts b/codegen/crm/lists/models/PublicTimePointOperationTimePoint.ts index 99f006128..d625020bf 100644 --- a/codegen/crm/lists/models/PublicTimePointOperationTimePoint.ts +++ b/codegen/crm/lists/models/PublicTimePointOperationTimePoint.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -14,18 +14,18 @@ import { PublicIndexOffset } from '../models/PublicIndexOffset'; import { PublicIndexedTimePointIndexReference } from '../models/PublicIndexedTimePointIndexReference'; export class PublicTimePointOperationTimePoint { - 'timeType': PublicTimePointOperationTimePointTimeTypeEnum; + 'month': number; + 'hour'?: number; + 'year': number; 'timezoneSource'?: string; + 'millisecond'?: number; + 'timeType': PublicTimePointOperationTimePointTimeTypeEnum; 'zoneId': string; - 'year': number; - 'month': number; 'day': number; - 'hour'?: number; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; - 'indexReference': PublicIndexedTimePointIndexReference; 'offset'?: PublicIndexOffset; + 'indexReference': PublicIndexedTimePointIndexReference; 'property': string; 'referenceType': string; @@ -33,22 +33,16 @@ export class PublicTimePointOperationTimePoint { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "timeType", - "baseName": "timeType", - "type": "PublicTimePointOperationTimePointTimeTypeEnum", - "format": "" - }, - { - "name": "timezoneSource", - "baseName": "timezoneSource", - "type": "string", - "format": "" + "name": "month", + "baseName": "month", + "type": "number", + "format": "int32" }, { - "name": "zoneId", - "baseName": "zoneId", - "type": "string", - "format": "" + "name": "hour", + "baseName": "hour", + "type": "number", + "format": "int32" }, { "name": "year", @@ -57,20 +51,32 @@ export class PublicTimePointOperationTimePoint { "format": "int32" }, { - "name": "month", - "baseName": "month", - "type": "number", - "format": "int32" + "name": "timezoneSource", + "baseName": "timezoneSource", + "type": "string", + "format": "" }, { - "name": "day", - "baseName": "day", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "hour", - "baseName": "hour", + "name": "timeType", + "baseName": "timeType", + "type": "PublicTimePointOperationTimePointTimeTypeEnum", + "format": "" + }, + { + "name": "zoneId", + "baseName": "zoneId", + "type": "string", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, @@ -87,10 +93,10 @@ export class PublicTimePointOperationTimePoint { "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", - "type": "number", - "format": "int32" + "name": "offset", + "baseName": "offset", + "type": "PublicIndexOffset", + "format": "" }, { "name": "indexReference", @@ -98,12 +104,6 @@ export class PublicTimePointOperationTimePoint { "type": "PublicIndexedTimePointIndexReference", "format": "" }, - { - "name": "offset", - "baseName": "offset", - "type": "PublicIndexOffset", - "format": "" - }, { "name": "property", "baseName": "property", diff --git a/codegen/crm/lists/models/PublicTodayReference.ts b/codegen/crm/lists/models/PublicTodayReference.ts index 7ae6260eb..2c47c7c90 100644 --- a/codegen/crm/lists/models/PublicTodayReference.ts +++ b/codegen/crm/lists/models/PublicTodayReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,21 +12,15 @@ export class PublicTodayReference { - 'referenceType': PublicTodayReferenceReferenceTypeEnum; 'hour'?: number; + 'millisecond'?: number; + 'referenceType': PublicTodayReferenceReferenceTypeEnum; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicTodayReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -34,20 +28,26 @@ export class PublicTodayReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicTodayReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/PublicUnifiedEventsFilter.ts b/codegen/crm/lists/models/PublicUnifiedEventsFilter.ts index 7a37dd780..102c03481 100644 --- a/codegen/crm/lists/models/PublicUnifiedEventsFilter.ts +++ b/codegen/crm/lists/models/PublicUnifiedEventsFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,35 +10,23 @@ * Do not edit the class manually. */ -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; import { PublicEventFilterMetadata } from '../models/PublicEventFilterMetadata'; +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; export class PublicUnifiedEventsFilter { - 'filterType': PublicUnifiedEventsFilterFilterTypeEnum; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'eventTypeId'?: string; 'filterLines': Array; + 'pruningRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; + 'filterType': PublicUnifiedEventsFilterFilterTypeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicUnifiedEventsFilterFilterTypeEnum", - "format": "" - }, - { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", - "format": "" - }, { "name": "coalescingRefineBy", "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { @@ -52,6 +40,18 @@ export class PublicUnifiedEventsFilter { "baseName": "filterLines", "type": "Array", "format": "" + }, + { + "name": "pruningRefineBy", + "baseName": "pruningRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", + "format": "" + }, + { + "name": "filterType", + "baseName": "filterType", + "type": "PublicUnifiedEventsFilterFilterTypeEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicUnifiedEventsFilterBranch.ts b/codegen/crm/lists/models/PublicUnifiedEventsFilterBranch.ts index 506690fe8..32f185971 100644 --- a/codegen/crm/lists/models/PublicUnifiedEventsFilterBranch.ts +++ b/codegen/crm/lists/models/PublicUnifiedEventsFilterBranch.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -10,16 +10,18 @@ * Do not edit the class manually. */ +import { PublicFormSubmissionFilterCoalescingRefineBy } from '../models/PublicFormSubmissionFilterCoalescingRefineBy'; import { PublicPropertyAssociationFilterBranchFilterBranchesInner } from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInner'; import { PublicPropertyAssociationFilterBranchFiltersInner } from '../models/PublicPropertyAssociationFilterBranchFiltersInner'; export class PublicUnifiedEventsFilterBranch { 'filterBranchType': PublicUnifiedEventsFilterBranchFilterBranchTypeEnum; 'filterBranches': Array; - 'filters': Array; 'eventTypeId': string; - 'operator': PublicUnifiedEventsFilterBranchOperatorEnum; + 'coalescingRefineBy'?: PublicFormSubmissionFilterCoalescingRefineBy; 'filterBranchOperator': string; + 'filters': Array; + 'operator': PublicUnifiedEventsFilterBranchOperatorEnum; static readonly discriminator: string | undefined = undefined; @@ -36,12 +38,6 @@ export class PublicUnifiedEventsFilterBranch { "type": "Array", "format": "" }, - { - "name": "filters", - "baseName": "filters", - "type": "Array", - "format": "" - }, { "name": "eventTypeId", "baseName": "eventTypeId", @@ -49,9 +45,9 @@ export class PublicUnifiedEventsFilterBranch { "format": "" }, { - "name": "operator", - "baseName": "operator", - "type": "PublicUnifiedEventsFilterBranchOperatorEnum", + "name": "coalescingRefineBy", + "baseName": "coalescingRefineBy", + "type": "PublicFormSubmissionFilterCoalescingRefineBy", "format": "" }, { @@ -59,6 +55,18 @@ export class PublicUnifiedEventsFilterBranch { "baseName": "filterBranchOperator", "type": "string", "format": "" + }, + { + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "PublicUnifiedEventsFilterBranchOperatorEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicUnifiedEventsInListFilter.ts b/codegen/crm/lists/models/PublicUnifiedEventsInListFilter.ts deleted file mode 100644 index eaf3d2b63..000000000 --- a/codegen/crm/lists/models/PublicUnifiedEventsInListFilter.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Lists - * CRUD operations to manage lists and list memberships - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { PublicEventAnalyticsFilterCoalescingRefineBy } from '../models/PublicEventAnalyticsFilterCoalescingRefineBy'; - -export class PublicUnifiedEventsInListFilter { - 'filterType': PublicUnifiedEventsInListFilterFilterTypeEnum; - 'pruningRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'coalescingRefineBy'?: PublicEventAnalyticsFilterCoalescingRefineBy; - 'listId': number; - 'eventTypeId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "filterType", - "baseName": "filterType", - "type": "PublicUnifiedEventsInListFilterFilterTypeEnum", - "format": "" - }, - { - "name": "pruningRefineBy", - "baseName": "pruningRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", - "format": "" - }, - { - "name": "coalescingRefineBy", - "baseName": "coalescingRefineBy", - "type": "PublicEventAnalyticsFilterCoalescingRefineBy", - "format": "" - }, - { - "name": "listId", - "baseName": "listId", - "type": "number", - "format": "int32" - }, - { - "name": "eventTypeId", - "baseName": "eventTypeId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicUnifiedEventsInListFilter.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum PublicUnifiedEventsInListFilterFilterTypeEnum { - UnifiedEventsInList = 'UNIFIED_EVENTS_IN_LIST' -} - diff --git a/codegen/crm/lists/models/PublicWebinarFilter.ts b/codegen/crm/lists/models/PublicWebinarFilter.ts index 74bb6c4c4..4bd00857f 100644 --- a/codegen/crm/lists/models/PublicWebinarFilter.ts +++ b/codegen/crm/lists/models/PublicWebinarFilter.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,13 +12,19 @@ export class PublicWebinarFilter { + 'webinarId'?: string; 'filterType': PublicWebinarFilterFilterTypeEnum; 'operator': string; - 'webinarId'?: string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "webinarId", + "baseName": "webinarId", + "type": "string", + "format": "" + }, { "name": "filterType", "baseName": "filterType", @@ -30,12 +36,6 @@ export class PublicWebinarFilter { "baseName": "operator", "type": "string", "format": "" - }, - { - "name": "webinarId", - "baseName": "webinarId", - "type": "string", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/lists/models/PublicWeekReference.ts b/codegen/crm/lists/models/PublicWeekReference.ts index fd8d3f624..5c6084388 100644 --- a/codegen/crm/lists/models/PublicWeekReference.ts +++ b/codegen/crm/lists/models/PublicWeekReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,20 +12,20 @@ export class PublicWeekReference { - 'referenceType': PublicWeekReferenceReferenceTypeEnum; + 'dayOfWeek': PublicWeekReferenceDayOfWeekEnum; 'hour'?: number; + 'millisecond'?: number; + 'referenceType': PublicWeekReferenceReferenceTypeEnum; 'minute'?: number; 'second'?: number; - 'millisecond'?: number; - 'dayOfWeek': PublicWeekReferenceDayOfWeekEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicWeekReferenceReferenceTypeEnum", + "name": "dayOfWeek", + "baseName": "dayOfWeek", + "type": "PublicWeekReferenceDayOfWeekEnum", "format": "" }, { @@ -35,28 +35,28 @@ export class PublicWeekReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", - "type": "number", - "format": "int32" + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicWeekReferenceReferenceTypeEnum", + "format": "" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "dayOfWeek", - "baseName": "dayOfWeek", - "type": "PublicWeekReferenceDayOfWeekEnum", - "format": "" + "name": "second", + "baseName": "second", + "type": "number", + "format": "int32" } ]; static getAttributeTypeMap() { @@ -68,9 +68,6 @@ export class PublicWeekReference { } -export enum PublicWeekReferenceReferenceTypeEnum { - Week = 'WEEK' -} export enum PublicWeekReferenceDayOfWeekEnum { Monday = 'MONDAY', Tuesday = 'TUESDAY', @@ -80,4 +77,7 @@ export enum PublicWeekReferenceDayOfWeekEnum { Saturday = 'SATURDAY', Sunday = 'SUNDAY' } +export enum PublicWeekReferenceReferenceTypeEnum { + Week = 'WEEK' +} diff --git a/codegen/crm/lists/models/PublicYearReference.ts b/codegen/crm/lists/models/PublicYearReference.ts index 471384756..ddffbd05b 100644 --- a/codegen/crm/lists/models/PublicYearReference.ts +++ b/codegen/crm/lists/models/PublicYearReference.ts @@ -1,6 +1,6 @@ /** * Lists - * CRUD operations to manage lists and list memberships + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -12,23 +12,17 @@ export class PublicYearReference { - 'referenceType': PublicYearReferenceReferenceTypeEnum; 'hour'?: number; - 'minute'?: number; - 'second'?: number; - 'millisecond'?: number; 'month': number; + 'millisecond'?: number; + 'referenceType': PublicYearReferenceReferenceTypeEnum; 'day': number; + 'minute'?: number; + 'second'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "referenceType", - "baseName": "referenceType", - "type": "PublicYearReferenceReferenceTypeEnum", - "format": "" - }, { "name": "hour", "baseName": "hour", @@ -36,32 +30,38 @@ export class PublicYearReference { "format": "int32" }, { - "name": "minute", - "baseName": "minute", + "name": "month", + "baseName": "month", "type": "number", "format": "int32" }, { - "name": "second", - "baseName": "second", + "name": "millisecond", + "baseName": "millisecond", "type": "number", "format": "int32" }, { - "name": "millisecond", - "baseName": "millisecond", + "name": "referenceType", + "baseName": "referenceType", + "type": "PublicYearReferenceReferenceTypeEnum", + "format": "" + }, + { + "name": "day", + "baseName": "day", "type": "number", "format": "int32" }, { - "name": "month", - "baseName": "month", + "name": "minute", + "baseName": "minute", "type": "number", "format": "int32" }, { - "name": "day", - "baseName": "day", + "name": "second", + "baseName": "second", "type": "number", "format": "int32" } ]; diff --git a/codegen/crm/lists/models/RecordListMembership.ts b/codegen/crm/lists/models/RecordListMembership.ts new file mode 100644 index 000000000..bac648519 --- /dev/null +++ b/codegen/crm/lists/models/RecordListMembership.ts @@ -0,0 +1,55 @@ +/** + * Lists + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class RecordListMembership { + 'listId': string; + 'listVersion': number; + 'lastAddedTimestamp': Date; + 'firstAddedTimestamp': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "listId", + "baseName": "listId", + "type": "string", + "format": "" + }, + { + "name": "listVersion", + "baseName": "listVersion", + "type": "number", + "format": "int32" + }, + { + "name": "lastAddedTimestamp", + "baseName": "lastAddedTimestamp", + "type": "Date", + "format": "date-time" + }, + { + "name": "firstAddedTimestamp", + "baseName": "firstAddedTimestamp", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return RecordListMembership.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/lists/models/all.ts b/codegen/crm/lists/models/all.ts index 413756e3f..9e0150a6d 100644 --- a/codegen/crm/lists/models/all.ts +++ b/codegen/crm/lists/models/all.ts @@ -1,9 +1,15 @@ -export * from '../models/CollectionResponseLong' +export * from '../models/ApiCollectionResponseJoinTimeAndRecordId' +export * from '../models/ApiCollectionResponseRecordListMembershipNoPaging' export * from '../models/ErrorDetail' +export * from '../models/JoinTimeAndRecordId' export * from '../models/ListCreateRequest' export * from '../models/ListCreateResponse' export * from '../models/ListFetchResponse' export * from '../models/ListFilterUpdateRequest' +export * from '../models/ListFolderCreateRequest' +export * from '../models/ListFolderCreateResponse' +export * from '../models/ListFolderFetchResponse' +export * from '../models/ListMoveRequest' export * from '../models/ListSearchRequest' export * from '../models/ListSearchResponse' export * from '../models/ListUpdateResponse' @@ -23,6 +29,7 @@ export * from '../models/PublicAllPropertyTypesOperation' export * from '../models/PublicAndFilterBranch' export * from '../models/PublicAssociationFilterBranch' export * from '../models/PublicAssociationInListFilter' +export * from '../models/PublicBatchMigrationMapping' export * from '../models/PublicBoolPropertyOperation' export * from '../models/PublicCalendarDatePropertyOperation' export * from '../models/PublicCampaignInfluencedFilter' @@ -38,11 +45,11 @@ export * from '../models/PublicEmailEventFilter' export * from '../models/PublicEmailSubscriptionFilter' export * from '../models/PublicEnumerationPropertyOperation' export * from '../models/PublicEventAnalyticsFilter' -export * from '../models/PublicEventAnalyticsFilterCoalescingRefineBy' export * from '../models/PublicEventFilterMetadata' export * from '../models/PublicFiscalQuarterReference' export * from '../models/PublicFiscalYearReference' export * from '../models/PublicFormSubmissionFilter' +export * from '../models/PublicFormSubmissionFilterCoalescingRefineBy' export * from '../models/PublicFormSubmissionOnPageFilter' export * from '../models/PublicInListFilter' export * from '../models/PublicInListFilterMetadata' @@ -50,6 +57,8 @@ export * from '../models/PublicIndexOffset' export * from '../models/PublicIndexedTimePoint' export * from '../models/PublicIndexedTimePointIndexReference' export * from '../models/PublicIntegrationEventFilter' +export * from '../models/PublicListFolder' +export * from '../models/PublicMigrationMapping' export * from '../models/PublicMonthReference' export * from '../models/PublicMultiStringPropertyOperation' export * from '../models/PublicNotAllFilterBranch' @@ -68,7 +77,6 @@ export * from '../models/PublicPropertyAssociationFilterBranchFilterBranchesInne export * from '../models/PublicPropertyAssociationFilterBranchFiltersInner' export * from '../models/PublicPropertyAssociationInListFilter' export * from '../models/PublicPropertyFilter' -export * from '../models/PublicPropertyFilterOperation' export * from '../models/PublicPropertyReferencedTime' export * from '../models/PublicQuarterReference' export * from '../models/PublicRangedDatePropertyOperation' @@ -83,13 +91,14 @@ export * from '../models/PublicSetOccurrencesRefineBy' export * from '../models/PublicStringPropertyOperation' export * from '../models/PublicSurveyMonkeyFilter' export * from '../models/PublicSurveyMonkeyValueFilter' +export * from '../models/PublicSurveyMonkeyValueFilterValueComparison' export * from '../models/PublicTimeOffset' export * from '../models/PublicTimePointOperation' export * from '../models/PublicTimePointOperationTimePoint' export * from '../models/PublicTodayReference' export * from '../models/PublicUnifiedEventsFilter' export * from '../models/PublicUnifiedEventsFilterBranch' -export * from '../models/PublicUnifiedEventsInListFilter' export * from '../models/PublicWebinarFilter' export * from '../models/PublicWeekReference' export * from '../models/PublicYearReference' +export * from '../models/RecordListMembership' diff --git a/codegen/crm/lists/types/ObjectParamAPI.ts b/codegen/crm/lists/types/ObjectParamAPI.ts index 016fdf432..08d04425e 100644 --- a/codegen/crm/lists/types/ObjectParamAPI.ts +++ b/codegen/crm/lists/types/ObjectParamAPI.ts @@ -1,17 +1,210 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { CollectionResponseLong } from '../models/CollectionResponseLong'; +import { ApiCollectionResponseJoinTimeAndRecordId } from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +import { ApiCollectionResponseRecordListMembershipNoPaging } from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; import { ListCreateRequest } from '../models/ListCreateRequest'; import { ListCreateResponse } from '../models/ListCreateResponse'; import { ListFetchResponse } from '../models/ListFetchResponse'; import { ListFilterUpdateRequest } from '../models/ListFilterUpdateRequest'; +import { ListFolderCreateRequest } from '../models/ListFolderCreateRequest'; +import { ListFolderCreateResponse } from '../models/ListFolderCreateResponse'; +import { ListFolderFetchResponse } from '../models/ListFolderFetchResponse'; +import { ListMoveRequest } from '../models/ListMoveRequest'; import { ListSearchRequest } from '../models/ListSearchRequest'; import { ListSearchResponse } from '../models/ListSearchResponse'; import { ListUpdateResponse } from '../models/ListUpdateResponse'; import { ListsByIdResponse } from '../models/ListsByIdResponse'; import { MembershipChangeRequest } from '../models/MembershipChangeRequest'; import { MembershipsUpdateResponse } from '../models/MembershipsUpdateResponse'; +import { PublicBatchMigrationMapping } from '../models/PublicBatchMigrationMapping'; +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; + +import { ObservableFoldersApi } from "./ObservableAPI"; +import { FoldersApiRequestFactory, FoldersApiResponseProcessor} from "../apis/FoldersApi"; + +export interface FoldersApiCreateRequest { + /** + * + * @type ListFolderCreateRequest + * @memberof FoldersApicreate + */ + listFolderCreateRequest: ListFolderCreateRequest +} + +export interface FoldersApiGetAllRequest { + /** + * The Id of the folder to retrieve. + * @type string + * @memberof FoldersApigetAll + */ + folderId?: string +} + +export interface FoldersApiMoveRequest { + /** + * + * @type string + * @memberof FoldersApimove + */ + folderId: string + /** + * + * @type string + * @memberof FoldersApimove + */ + newParentFolderId: string +} + +export interface FoldersApiMoveListRequest { + /** + * + * @type ListMoveRequest + * @memberof FoldersApimoveList + */ + listMoveRequest: ListMoveRequest +} + +export interface FoldersApiRemoveRequest { + /** + * + * @type string + * @memberof FoldersApiremove + */ + folderId: string +} + +export interface FoldersApiRenameRequest { + /** + * + * @type string + * @memberof FoldersApirename + */ + folderId: string + /** + * + * @type string + * @memberof FoldersApirename + */ + newFolderName?: string +} + +export class ObjectFoldersApi { + private api: ObservableFoldersApi + + public constructor(configuration: Configuration, requestFactory?: FoldersApiRequestFactory, responseProcessor?: FoldersApiResponseProcessor) { + this.api = new ObservableFoldersApi(configuration, requestFactory, responseProcessor); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param param the request object + */ + public createWithHttpInfo(param: FoldersApiCreateRequest, options?: Configuration): Promise> { + return this.api.createWithHttpInfo(param.listFolderCreateRequest, options).toPromise(); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param param the request object + */ + public create(param: FoldersApiCreateRequest, options?: Configuration): Promise { + return this.api.create(param.listFolderCreateRequest, options).toPromise(); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param param the request object + */ + public getAllWithHttpInfo(param: FoldersApiGetAllRequest = {}, options?: Configuration): Promise> { + return this.api.getAllWithHttpInfo(param.folderId, options).toPromise(); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param param the request object + */ + public getAll(param: FoldersApiGetAllRequest = {}, options?: Configuration): Promise { + return this.api.getAll(param.folderId, options).toPromise(); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param param the request object + */ + public moveWithHttpInfo(param: FoldersApiMoveRequest, options?: Configuration): Promise> { + return this.api.moveWithHttpInfo(param.folderId, param.newParentFolderId, options).toPromise(); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param param the request object + */ + public move(param: FoldersApiMoveRequest, options?: Configuration): Promise { + return this.api.move(param.folderId, param.newParentFolderId, options).toPromise(); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param param the request object + */ + public moveListWithHttpInfo(param: FoldersApiMoveListRequest, options?: Configuration): Promise> { + return this.api.moveListWithHttpInfo(param.listMoveRequest, options).toPromise(); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param param the request object + */ + public moveList(param: FoldersApiMoveListRequest, options?: Configuration): Promise { + return this.api.moveList(param.listMoveRequest, options).toPromise(); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param param the request object + */ + public removeWithHttpInfo(param: FoldersApiRemoveRequest, options?: Configuration): Promise> { + return this.api.removeWithHttpInfo(param.folderId, options).toPromise(); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param param the request object + */ + public remove(param: FoldersApiRemoveRequest, options?: Configuration): Promise { + return this.api.remove(param.folderId, options).toPromise(); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param param the request object + */ + public renameWithHttpInfo(param: FoldersApiRenameRequest, options?: Configuration): Promise> { + return this.api.renameWithHttpInfo(param.folderId, param.newFolderName, options).toPromise(); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param param the request object + */ + public rename(param: FoldersApiRenameRequest, options?: Configuration): Promise { + return this.api.rename(param.folderId, param.newFolderName, options).toPromise(); + } + +} import { ObservableListsApi } from "./ObservableAPI"; import { ListsApiRequestFactory, ListsApiResponseProcessor} from "../apis/ListsApi"; @@ -27,7 +220,7 @@ export interface ListsApiCreateRequest { export interface ListsApiDoSearchRequest { /** - * The IDs of the records to add and/or remove from the list. + * * @type ListSearchRequest * @memberof ListsApidoSearch */ @@ -37,10 +230,10 @@ export interface ListsApiDoSearchRequest { export interface ListsApiGetAllRequest { /** * The **ILS IDs** of the lists to fetch. - * @type Array<number> + * @type Array<string> * @memberof ListsApigetAll */ - listIds?: Array + listIds?: Array /** * A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. * @type boolean @@ -52,10 +245,10 @@ export interface ListsApiGetAllRequest { export interface ListsApiGetByIdRequest { /** * The **ILS ID** of the list to fetch. - * @type number + * @type string * @memberof ListsApigetById */ - listId: number + listId: string /** * A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. * @type boolean @@ -88,28 +281,28 @@ export interface ListsApiGetByNameRequest { export interface ListsApiRemoveRequest { /** * The **ILS ID** of the list to delete. - * @type number + * @type string * @memberof ListsApiremove */ - listId: number + listId: string } export interface ListsApiRestoreRequest { /** * The **ILS ID** of the list to restore. - * @type number + * @type string * @memberof ListsApirestore */ - listId: number + listId: string } export interface ListsApiUpdateListFiltersRequest { /** * The **ILS ID** of the list to update. - * @type number + * @type string * @memberof ListsApiupdateListFilters */ - listId: number + listId: string /** * * @type ListFilterUpdateRequest @@ -127,10 +320,10 @@ export interface ListsApiUpdateListFiltersRequest { export interface ListsApiUpdateNameRequest { /** * The **ILS ID** of the list to update. - * @type number + * @type string * @memberof ListsApiupdateName */ - listId: number + listId: string /** * The name to update the list to. * @type string @@ -316,61 +509,142 @@ export class ObjectListsApi { } +import { ObservableMappingApi } from "./ObservableAPI"; +import { MappingApiRequestFactory, MappingApiResponseProcessor} from "../apis/MappingApi"; + +export interface MappingApiTranslateLegacyListIdToListIdRequest { + /** + * The legacy list id from lists v1 API. + * @type string + * @memberof MappingApitranslateLegacyListIdToListId + */ + legacyListId?: string +} + +export interface MappingApiTranslateLegacyListIdToListIdBatchRequest { + /** + * + * @type Array<string> + * @memberof MappingApitranslateLegacyListIdToListIdBatch + */ + requestBody: Array +} + +export class ObjectMappingApi { + private api: ObservableMappingApi + + public constructor(configuration: Configuration, requestFactory?: MappingApiRequestFactory, responseProcessor?: MappingApiResponseProcessor) { + this.api = new ObservableMappingApi(configuration, requestFactory, responseProcessor); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param param the request object + */ + public translateLegacyListIdToListIdWithHttpInfo(param: MappingApiTranslateLegacyListIdToListIdRequest = {}, options?: Configuration): Promise> { + return this.api.translateLegacyListIdToListIdWithHttpInfo(param.legacyListId, options).toPromise(); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param param the request object + */ + public translateLegacyListIdToListId(param: MappingApiTranslateLegacyListIdToListIdRequest = {}, options?: Configuration): Promise { + return this.api.translateLegacyListIdToListId(param.legacyListId, options).toPromise(); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param param the request object + */ + public translateLegacyListIdToListIdBatchWithHttpInfo(param: MappingApiTranslateLegacyListIdToListIdBatchRequest, options?: Configuration): Promise> { + return this.api.translateLegacyListIdToListIdBatchWithHttpInfo(param.requestBody, options).toPromise(); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param param the request object + */ + public translateLegacyListIdToListIdBatch(param: MappingApiTranslateLegacyListIdToListIdBatchRequest, options?: Configuration): Promise { + return this.api.translateLegacyListIdToListIdBatch(param.requestBody, options).toPromise(); + } + +} + import { ObservableMembershipsApi } from "./ObservableAPI"; import { MembershipsApiRequestFactory, MembershipsApiResponseProcessor} from "../apis/MembershipsApi"; export interface MembershipsApiAddRequest { /** * The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @type number + * @type string * @memberof MembershipsApiadd */ - listId: number + listId: string /** - * The IDs of the records to add to the list. - * @type Array<number> + * + * @type Array<string> * @memberof MembershipsApiadd */ - requestBody: Array + requestBody: Array } export interface MembershipsApiAddAllFromListRequest { /** * The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. - * @type number + * @type string * @memberof MembershipsApiaddAllFromList */ - listId: number + listId: string /** * The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. - * @type number + * @type string * @memberof MembershipsApiaddAllFromList */ - sourceListId: number + sourceListId: string } export interface MembershipsApiAddAndRemoveRequest { /** * The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @type number + * @type string * @memberof MembershipsApiaddAndRemove */ - listId: number + listId: string /** - * The IDs of the records to add and/or remove from the list. + * * @type MembershipChangeRequest * @memberof MembershipsApiaddAndRemove */ membershipChangeRequest: MembershipChangeRequest } +export interface MembershipsApiGetListsRequest { + /** + * Object type id of the record + * @type string + * @memberof MembershipsApigetLists + */ + objectTypeId: string + /** + * Id of the record + * @type string + * @memberof MembershipsApigetLists + */ + recordId: string +} + export interface MembershipsApiGetPageRequest { /** * The **ILS ID** of the list. - * @type number + * @type string * @memberof MembershipsApigetPage */ - listId: number + listId: string /** * The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. * @type string @@ -391,28 +665,55 @@ export interface MembershipsApiGetPageRequest { limit?: number } +export interface MembershipsApiGetPageOrderedByAddedToListDateRequest { + /** + * The **ILS ID** of the list. + * @type string + * @memberof MembershipsApigetPageOrderedByAddedToListDate + */ + listId: string + /** + * The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @type string + * @memberof MembershipsApigetPageOrderedByAddedToListDate + */ + after?: string + /** + * The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @type string + * @memberof MembershipsApigetPageOrderedByAddedToListDate + */ + before?: string + /** + * The number of records to return in the response. The maximum `limit` is 250. + * @type number + * @memberof MembershipsApigetPageOrderedByAddedToListDate + */ + limit?: number +} + export interface MembershipsApiRemoveRequest { /** * The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @type number + * @type string * @memberof MembershipsApiremove */ - listId: number + listId: string /** - * The IDs of the records to remove from the list. - * @type Array<number> + * + * @type Array<string> * @memberof MembershipsApiremove */ - requestBody: Array + requestBody: Array } export interface MembershipsApiRemoveAllRequest { /** * The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @type number + * @type string * @memberof MembershipsApiremoveAll */ - listId: number + listId: string } export class ObjectMembershipsApi { @@ -441,7 +742,7 @@ export class ObjectMembershipsApi { } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param param the request object */ @@ -450,7 +751,7 @@ export class ObjectMembershipsApi { } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param param the request object */ @@ -476,12 +777,30 @@ export class ObjectMembershipsApi { return this.api.addAndRemove(param.listId, param.membershipChangeRequest, options).toPromise(); } + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param param the request object + */ + public getListsWithHttpInfo(param: MembershipsApiGetListsRequest, options?: Configuration): Promise> { + return this.api.getListsWithHttpInfo(param.objectTypeId, param.recordId, options).toPromise(); + } + + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param param the request object + */ + public getLists(param: MembershipsApiGetListsRequest, options?: Configuration): Promise { + return this.api.getLists(param.objectTypeId, param.recordId, options).toPromise(); + } + /** * Fetch the memberships of a list in order sorted by the `recordId` of the records in the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. * Fetch List Memberships Ordered by ID * @param param the request object */ - public getPageWithHttpInfo(param: MembershipsApiGetPageRequest, options?: Configuration): Promise> { + public getPageWithHttpInfo(param: MembershipsApiGetPageRequest, options?: Configuration): Promise> { return this.api.getPageWithHttpInfo(param.listId, param.after, param.before, param.limit, options).toPromise(); } @@ -490,10 +809,28 @@ export class ObjectMembershipsApi { * Fetch List Memberships Ordered by ID * @param param the request object */ - public getPage(param: MembershipsApiGetPageRequest, options?: Configuration): Promise { + public getPage(param: MembershipsApiGetPageRequest, options?: Configuration): Promise { return this.api.getPage(param.listId, param.after, param.before, param.limit, options).toPromise(); } + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param param the request object + */ + public getPageOrderedByAddedToListDateWithHttpInfo(param: MembershipsApiGetPageOrderedByAddedToListDateRequest, options?: Configuration): Promise> { + return this.api.getPageOrderedByAddedToListDateWithHttpInfo(param.listId, param.after, param.before, param.limit, options).toPromise(); + } + + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param param the request object + */ + public getPageOrderedByAddedToListDate(param: MembershipsApiGetPageOrderedByAddedToListDateRequest, options?: Configuration): Promise { + return this.api.getPageOrderedByAddedToListDate(param.listId, param.after, param.before, param.limit, options).toPromise(); + } + /** * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List @@ -513,7 +850,7 @@ export class ObjectMembershipsApi { } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param param the request object */ @@ -522,7 +859,7 @@ export class ObjectMembershipsApi { } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param param the request object */ diff --git a/codegen/crm/lists/types/ObservableAPI.ts b/codegen/crm/lists/types/ObservableAPI.ts index 505259990..cd3a643bf 100644 --- a/codegen/crm/lists/types/ObservableAPI.ts +++ b/codegen/crm/lists/types/ObservableAPI.ts @@ -2,17 +2,244 @@ import { ResponseContext, RequestContext, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; -import { CollectionResponseLong } from '../models/CollectionResponseLong'; +import { ApiCollectionResponseJoinTimeAndRecordId } from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +import { ApiCollectionResponseRecordListMembershipNoPaging } from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; import { ListCreateRequest } from '../models/ListCreateRequest'; import { ListCreateResponse } from '../models/ListCreateResponse'; import { ListFetchResponse } from '../models/ListFetchResponse'; import { ListFilterUpdateRequest } from '../models/ListFilterUpdateRequest'; +import { ListFolderCreateRequest } from '../models/ListFolderCreateRequest'; +import { ListFolderCreateResponse } from '../models/ListFolderCreateResponse'; +import { ListFolderFetchResponse } from '../models/ListFolderFetchResponse'; +import { ListMoveRequest } from '../models/ListMoveRequest'; import { ListSearchRequest } from '../models/ListSearchRequest'; import { ListSearchResponse } from '../models/ListSearchResponse'; import { ListUpdateResponse } from '../models/ListUpdateResponse'; import { ListsByIdResponse } from '../models/ListsByIdResponse'; import { MembershipChangeRequest } from '../models/MembershipChangeRequest'; import { MembershipsUpdateResponse } from '../models/MembershipsUpdateResponse'; +import { PublicBatchMigrationMapping } from '../models/PublicBatchMigrationMapping'; +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; + +import { FoldersApiRequestFactory, FoldersApiResponseProcessor} from "../apis/FoldersApi"; +export class ObservableFoldersApi { + private requestFactory: FoldersApiRequestFactory; + private responseProcessor: FoldersApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: FoldersApiRequestFactory, + responseProcessor?: FoldersApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new FoldersApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new FoldersApiResponseProcessor(); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param listFolderCreateRequest + */ + public createWithHttpInfo(listFolderCreateRequest: ListFolderCreateRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.create(listFolderCreateRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWithHttpInfo(rsp))); + })); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param listFolderCreateRequest + */ + public create(listFolderCreateRequest: ListFolderCreateRequest, _options?: Configuration): Observable { + return this.createWithHttpInfo(listFolderCreateRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param folderId The Id of the folder to retrieve. + */ + public getAllWithHttpInfo(folderId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getAll(folderId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAllWithHttpInfo(rsp))); + })); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param folderId The Id of the folder to retrieve. + */ + public getAll(folderId?: string, _options?: Configuration): Observable { + return this.getAllWithHttpInfo(folderId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param folderId + * @param newParentFolderId + */ + public moveWithHttpInfo(folderId: string, newParentFolderId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.move(folderId, newParentFolderId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.moveWithHttpInfo(rsp))); + })); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param folderId + * @param newParentFolderId + */ + public move(folderId: string, newParentFolderId: string, _options?: Configuration): Observable { + return this.moveWithHttpInfo(folderId, newParentFolderId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param listMoveRequest + */ + public moveListWithHttpInfo(listMoveRequest: ListMoveRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.moveList(listMoveRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.moveListWithHttpInfo(rsp))); + })); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param listMoveRequest + */ + public moveList(listMoveRequest: ListMoveRequest, _options?: Configuration): Observable { + return this.moveListWithHttpInfo(listMoveRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param folderId + */ + public removeWithHttpInfo(folderId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.remove(folderId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.removeWithHttpInfo(rsp))); + })); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param folderId + */ + public remove(folderId: string, _options?: Configuration): Observable { + return this.removeWithHttpInfo(folderId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param folderId + * @param newFolderName + */ + public renameWithHttpInfo(folderId: string, newFolderName?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.rename(folderId, newFolderName, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.renameWithHttpInfo(rsp))); + })); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param folderId + * @param newFolderName + */ + public rename(folderId: string, newFolderName?: string, _options?: Configuration): Observable { + return this.renameWithHttpInfo(folderId, newFolderName, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} import { ListsApiRequestFactory, ListsApiResponseProcessor} from "../apis/ListsApi"; export class ObservableListsApi { @@ -66,7 +293,7 @@ export class ObservableListsApi { /** * Search lists by list name or page through all lists by providing an empty `query` value. * Search Lists - * @param listSearchRequest The IDs of the records to add and/or remove from the list. + * @param listSearchRequest */ public doSearchWithHttpInfo(listSearchRequest: ListSearchRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.doSearch(listSearchRequest, _options); @@ -90,7 +317,7 @@ export class ObservableListsApi { /** * Search lists by list name or page through all lists by providing an empty `query` value. * Search Lists - * @param listSearchRequest The IDs of the records to add and/or remove from the list. + * @param listSearchRequest */ public doSearch(listSearchRequest: ListSearchRequest, _options?: Configuration): Observable { return this.doSearchWithHttpInfo(listSearchRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -102,7 +329,7 @@ export class ObservableListsApi { * @param listIds The **ILS IDs** of the lists to fetch. * @param includeFilters A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getAllWithHttpInfo(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Observable> { + public getAllWithHttpInfo(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getAll(listIds, includeFilters, _options); // build promise chain @@ -127,7 +354,7 @@ export class ObservableListsApi { * @param listIds The **ILS IDs** of the lists to fetch. * @param includeFilters A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Observable { + public getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Observable { return this.getAllWithHttpInfo(listIds, includeFilters, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -137,7 +364,7 @@ export class ObservableListsApi { * @param listId The **ILS ID** of the list to fetch. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getByIdWithHttpInfo(listId: number, includeFilters?: boolean, _options?: Configuration): Observable> { + public getByIdWithHttpInfo(listId: string, includeFilters?: boolean, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(listId, includeFilters, _options); // build promise chain @@ -162,7 +389,7 @@ export class ObservableListsApi { * @param listId The **ILS ID** of the list to fetch. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getById(listId: number, includeFilters?: boolean, _options?: Configuration): Observable { + public getById(listId: string, includeFilters?: boolean, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(listId, includeFilters, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -208,7 +435,7 @@ export class ObservableListsApi { * Delete a List * @param listId The **ILS ID** of the list to delete. */ - public removeWithHttpInfo(listId: number, _options?: Configuration): Observable> { + public removeWithHttpInfo(listId: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.remove(listId, _options); // build promise chain @@ -232,7 +459,7 @@ export class ObservableListsApi { * Delete a List * @param listId The **ILS ID** of the list to delete. */ - public remove(listId: number, _options?: Configuration): Observable { + public remove(listId: string, _options?: Configuration): Observable { return this.removeWithHttpInfo(listId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -241,7 +468,7 @@ export class ObservableListsApi { * Restore a List * @param listId The **ILS ID** of the list to restore. */ - public restoreWithHttpInfo(listId: number, _options?: Configuration): Observable> { + public restoreWithHttpInfo(listId: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.restore(listId, _options); // build promise chain @@ -265,7 +492,7 @@ export class ObservableListsApi { * Restore a List * @param listId The **ILS ID** of the list to restore. */ - public restore(listId: number, _options?: Configuration): Observable { + public restore(listId: string, _options?: Configuration): Observable { return this.restoreWithHttpInfo(listId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -276,7 +503,7 @@ export class ObservableListsApi { * @param listFilterUpdateRequest * @param enrollObjectsInWorkflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. */ - public updateListFiltersWithHttpInfo(listId: number, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Observable> { + public updateListFiltersWithHttpInfo(listId: string, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.updateListFilters(listId, listFilterUpdateRequest, enrollObjectsInWorkflows, _options); // build promise chain @@ -302,7 +529,7 @@ export class ObservableListsApi { * @param listFilterUpdateRequest * @param enrollObjectsInWorkflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. */ - public updateListFilters(listId: number, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Observable { + public updateListFilters(listId: string, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Observable { return this.updateListFiltersWithHttpInfo(listId, listFilterUpdateRequest, enrollObjectsInWorkflows, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -313,7 +540,7 @@ export class ObservableListsApi { * @param listName The name to update the list to. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public updateNameWithHttpInfo(listId: number, listName?: string, includeFilters?: boolean, _options?: Configuration): Observable> { + public updateNameWithHttpInfo(listId: string, listName?: string, includeFilters?: boolean, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.updateName(listId, listName, includeFilters, _options); // build promise chain @@ -339,12 +566,96 @@ export class ObservableListsApi { * @param listName The name to update the list to. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public updateName(listId: number, listName?: string, includeFilters?: boolean, _options?: Configuration): Observable { + public updateName(listId: string, listName?: string, includeFilters?: boolean, _options?: Configuration): Observable { return this.updateNameWithHttpInfo(listId, listName, includeFilters, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } +import { MappingApiRequestFactory, MappingApiResponseProcessor} from "../apis/MappingApi"; +export class ObservableMappingApi { + private requestFactory: MappingApiRequestFactory; + private responseProcessor: MappingApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: MappingApiRequestFactory, + responseProcessor?: MappingApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new MappingApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new MappingApiResponseProcessor(); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param legacyListId The legacy list id from lists v1 API. + */ + public translateLegacyListIdToListIdWithHttpInfo(legacyListId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.translateLegacyListIdToListId(legacyListId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.translateLegacyListIdToListIdWithHttpInfo(rsp))); + })); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param legacyListId The legacy list id from lists v1 API. + */ + public translateLegacyListIdToListId(legacyListId?: string, _options?: Configuration): Observable { + return this.translateLegacyListIdToListIdWithHttpInfo(legacyListId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param requestBody + */ + public translateLegacyListIdToListIdBatchWithHttpInfo(requestBody: Array, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.translateLegacyListIdToListIdBatch(requestBody, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.translateLegacyListIdToListIdBatchWithHttpInfo(rsp))); + })); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param requestBody + */ + public translateLegacyListIdToListIdBatch(requestBody: Array, _options?: Configuration): Observable { + return this.translateLegacyListIdToListIdBatchWithHttpInfo(requestBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} + import { MembershipsApiRequestFactory, MembershipsApiResponseProcessor} from "../apis/MembershipsApi"; export class ObservableMembershipsApi { private requestFactory: MembershipsApiRequestFactory; @@ -365,9 +676,9 @@ export class ObservableMembershipsApi { * Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add Records to a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to add to the list. + * @param requestBody */ - public addWithHttpInfo(listId: number, requestBody: Array, _options?: Configuration): Observable> { + public addWithHttpInfo(listId: string, requestBody: Array, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.add(listId, requestBody, _options); // build promise chain @@ -390,19 +701,19 @@ export class ObservableMembershipsApi { * Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add Records to a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to add to the list. + * @param requestBody */ - public add(listId: number, requestBody: Array, _options?: Configuration): Observable { + public add(listId: string, requestBody: Array, _options?: Configuration): Observable { return this.addWithHttpInfo(listId, requestBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. * @param sourceListId The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. */ - public addAllFromListWithHttpInfo(listId: number, sourceListId: number, _options?: Configuration): Observable> { + public addAllFromListWithHttpInfo(listId: string, sourceListId: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.addAllFromList(listId, sourceListId, _options); // build promise chain @@ -422,12 +733,12 @@ export class ObservableMembershipsApi { } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. * @param sourceListId The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. */ - public addAllFromList(listId: number, sourceListId: number, _options?: Configuration): Observable { + public addAllFromList(listId: string, sourceListId: string, _options?: Configuration): Observable { return this.addAllFromListWithHttpInfo(listId, sourceListId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } @@ -435,9 +746,9 @@ export class ObservableMembershipsApi { * Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add and/or Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param membershipChangeRequest The IDs of the records to add and/or remove from the list. + * @param membershipChangeRequest */ - public addAndRemoveWithHttpInfo(listId: number, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Observable> { + public addAndRemoveWithHttpInfo(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.addAndRemove(listId, membershipChangeRequest, _options); // build promise chain @@ -460,12 +771,47 @@ export class ObservableMembershipsApi { * Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add and/or Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param membershipChangeRequest The IDs of the records to add and/or remove from the list. + * @param membershipChangeRequest */ - public addAndRemove(listId: number, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Observable { + public addAndRemove(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Observable { return this.addAndRemoveWithHttpInfo(listId, membershipChangeRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param objectTypeId Object type id of the record + * @param recordId Id of the record + */ + public getListsWithHttpInfo(objectTypeId: string, recordId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getLists(objectTypeId, recordId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getListsWithHttpInfo(rsp))); + })); + } + + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param objectTypeId Object type id of the record + * @param recordId Id of the record + */ + public getLists(objectTypeId: string, recordId: string, _options?: Configuration): Observable { + return this.getListsWithHttpInfo(objectTypeId, recordId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + /** * Fetch the memberships of a list in order sorted by the `recordId` of the records in the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. * Fetch List Memberships Ordered by ID @@ -474,7 +820,7 @@ export class ObservableMembershipsApi { * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. * @param limit The number of records to return in the response. The maximum `limit` is 250. */ - public getPageWithHttpInfo(listId: number, after?: string, before?: string, limit?: number, _options?: Configuration): Observable> { + public getPageWithHttpInfo(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getPage(listId, after, before, limit, _options); // build promise chain @@ -501,17 +847,56 @@ export class ObservableMembershipsApi { * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. * @param limit The number of records to return in the response. The maximum `limit` is 250. */ - public getPage(listId: number, after?: string, before?: string, limit?: number, _options?: Configuration): Observable { - return this.getPageWithHttpInfo(listId, after, before, limit, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public getPage(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Observable { + return this.getPageWithHttpInfo(listId, after, before, limit, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param listId The **ILS ID** of the list. + * @param after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @param limit The number of records to return in the response. The maximum `limit` is 250. + */ + public getPageOrderedByAddedToListDateWithHttpInfo(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getPageOrderedByAddedToListDate(listId, after, before, limit, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPageOrderedByAddedToListDateWithHttpInfo(rsp))); + })); + } + + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param listId The **ILS ID** of the list. + * @param after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @param limit The number of records to return in the response. The maximum `limit` is 250. + */ + public getPageOrderedByAddedToListDate(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Observable { + return this.getPageOrderedByAddedToListDateWithHttpInfo(listId, after, before, limit, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to remove from the list. + * @param requestBody */ - public removeWithHttpInfo(listId: number, requestBody: Array, _options?: Configuration): Observable> { + public removeWithHttpInfo(listId: string, requestBody: Array, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.remove(listId, requestBody, _options); // build promise chain @@ -534,18 +919,18 @@ export class ObservableMembershipsApi { * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to remove from the list. + * @param requestBody */ - public remove(listId: number, requestBody: Array, _options?: Configuration): Observable { + public remove(listId: string, requestBody: Array, _options?: Configuration): Observable { return this.removeWithHttpInfo(listId, requestBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. */ - public removeAllWithHttpInfo(listId: number, _options?: Configuration): Observable> { + public removeAllWithHttpInfo(listId: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.removeAll(listId, _options); // build promise chain @@ -565,11 +950,11 @@ export class ObservableMembershipsApi { } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. */ - public removeAll(listId: number, _options?: Configuration): Observable { + public removeAll(listId: string, _options?: Configuration): Observable { return this.removeAllWithHttpInfo(listId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } diff --git a/codegen/crm/lists/types/PromiseAPI.ts b/codegen/crm/lists/types/PromiseAPI.ts index 54728a5ff..efcfbb952 100644 --- a/codegen/crm/lists/types/PromiseAPI.ts +++ b/codegen/crm/lists/types/PromiseAPI.ts @@ -1,17 +1,167 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { CollectionResponseLong } from '../models/CollectionResponseLong'; +import { ApiCollectionResponseJoinTimeAndRecordId } from '../models/ApiCollectionResponseJoinTimeAndRecordId'; +import { ApiCollectionResponseRecordListMembershipNoPaging } from '../models/ApiCollectionResponseRecordListMembershipNoPaging'; import { ListCreateRequest } from '../models/ListCreateRequest'; import { ListCreateResponse } from '../models/ListCreateResponse'; import { ListFetchResponse } from '../models/ListFetchResponse'; import { ListFilterUpdateRequest } from '../models/ListFilterUpdateRequest'; +import { ListFolderCreateRequest } from '../models/ListFolderCreateRequest'; +import { ListFolderCreateResponse } from '../models/ListFolderCreateResponse'; +import { ListFolderFetchResponse } from '../models/ListFolderFetchResponse'; +import { ListMoveRequest } from '../models/ListMoveRequest'; import { ListSearchRequest } from '../models/ListSearchRequest'; import { ListSearchResponse } from '../models/ListSearchResponse'; import { ListUpdateResponse } from '../models/ListUpdateResponse'; import { ListsByIdResponse } from '../models/ListsByIdResponse'; import { MembershipChangeRequest } from '../models/MembershipChangeRequest'; import { MembershipsUpdateResponse } from '../models/MembershipsUpdateResponse'; +import { PublicBatchMigrationMapping } from '../models/PublicBatchMigrationMapping'; +import { PublicMigrationMapping } from '../models/PublicMigrationMapping'; +import { ObservableFoldersApi } from './ObservableAPI'; + +import { FoldersApiRequestFactory, FoldersApiResponseProcessor} from "../apis/FoldersApi"; +export class PromiseFoldersApi { + private api: ObservableFoldersApi + + public constructor( + configuration: Configuration, + requestFactory?: FoldersApiRequestFactory, + responseProcessor?: FoldersApiResponseProcessor + ) { + this.api = new ObservableFoldersApi(configuration, requestFactory, responseProcessor); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param listFolderCreateRequest + */ + public createWithHttpInfo(listFolderCreateRequest: ListFolderCreateRequest, _options?: Configuration): Promise> { + const result = this.api.createWithHttpInfo(listFolderCreateRequest, _options); + return result.toPromise(); + } + + /** + * Creates a folder with the given information. + * Creates a folder + * @param listFolderCreateRequest + */ + public create(listFolderCreateRequest: ListFolderCreateRequest, _options?: Configuration): Promise { + const result = this.api.create(listFolderCreateRequest, _options); + return result.toPromise(); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param folderId The Id of the folder to retrieve. + */ + public getAllWithHttpInfo(folderId?: string, _options?: Configuration): Promise> { + const result = this.api.getAllWithHttpInfo(folderId, _options); + return result.toPromise(); + } + + /** + * Retrieves a folder and recursively includes all folders via the childNodes attribute. The child lists field will be empty in all child nodes. Only the folder retrieved will include the child lists in that folder. + * Retrieves a folder. + * @param folderId The Id of the folder to retrieve. + */ + public getAll(folderId?: string, _options?: Configuration): Promise { + const result = this.api.getAll(folderId, _options); + return result.toPromise(); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param folderId + * @param newParentFolderId + */ + public moveWithHttpInfo(folderId: string, newParentFolderId: string, _options?: Configuration): Promise> { + const result = this.api.moveWithHttpInfo(folderId, newParentFolderId, _options); + return result.toPromise(); + } + + /** + * This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given. + * Moves a folder + * @param folderId + * @param newParentFolderId + */ + public move(folderId: string, newParentFolderId: string, _options?: Configuration): Promise { + const result = this.api.move(folderId, newParentFolderId, _options); + return result.toPromise(); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param listMoveRequest + */ + public moveListWithHttpInfo(listMoveRequest: ListMoveRequest, _options?: Configuration): Promise> { + const result = this.api.moveListWithHttpInfo(listMoveRequest, _options); + return result.toPromise(); + } + + /** + * Given a list and a folder, the list will be moved to that folder. + * Moves a list to a given folder + * @param listMoveRequest + */ + public moveList(listMoveRequest: ListMoveRequest, _options?: Configuration): Promise { + const result = this.api.moveList(listMoveRequest, _options); + return result.toPromise(); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param folderId + */ + public removeWithHttpInfo(folderId: string, _options?: Configuration): Promise> { + const result = this.api.removeWithHttpInfo(folderId, _options); + return result.toPromise(); + } + + /** + * Deletes the folder with the given Id. + * Deletes a folder + * @param folderId + */ + public remove(folderId: string, _options?: Configuration): Promise { + const result = this.api.remove(folderId, _options); + return result.toPromise(); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param folderId + * @param newFolderName + */ + public renameWithHttpInfo(folderId: string, newFolderName?: string, _options?: Configuration): Promise> { + const result = this.api.renameWithHttpInfo(folderId, newFolderName, _options); + return result.toPromise(); + } + + /** + * Renames the given folderId with a new name. + * Rename a folder + * @param folderId + * @param newFolderName + */ + public rename(folderId: string, newFolderName?: string, _options?: Configuration): Promise { + const result = this.api.rename(folderId, newFolderName, _options); + return result.toPromise(); + } + + +} + + + import { ObservableListsApi } from './ObservableAPI'; import { ListsApiRequestFactory, ListsApiResponseProcessor} from "../apis/ListsApi"; @@ -49,7 +199,7 @@ export class PromiseListsApi { /** * Search lists by list name or page through all lists by providing an empty `query` value. * Search Lists - * @param listSearchRequest The IDs of the records to add and/or remove from the list. + * @param listSearchRequest */ public doSearchWithHttpInfo(listSearchRequest: ListSearchRequest, _options?: Configuration): Promise> { const result = this.api.doSearchWithHttpInfo(listSearchRequest, _options); @@ -59,7 +209,7 @@ export class PromiseListsApi { /** * Search lists by list name or page through all lists by providing an empty `query` value. * Search Lists - * @param listSearchRequest The IDs of the records to add and/or remove from the list. + * @param listSearchRequest */ public doSearch(listSearchRequest: ListSearchRequest, _options?: Configuration): Promise { const result = this.api.doSearch(listSearchRequest, _options); @@ -72,7 +222,7 @@ export class PromiseListsApi { * @param listIds The **ILS IDs** of the lists to fetch. * @param includeFilters A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getAllWithHttpInfo(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise> { + public getAllWithHttpInfo(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise> { const result = this.api.getAllWithHttpInfo(listIds, includeFilters, _options); return result.toPromise(); } @@ -83,7 +233,7 @@ export class PromiseListsApi { * @param listIds The **ILS IDs** of the lists to fetch. * @param includeFilters A flag indicating whether or not the response object list definitions should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise { + public getAll(listIds?: Array, includeFilters?: boolean, _options?: Configuration): Promise { const result = this.api.getAll(listIds, includeFilters, _options); return result.toPromise(); } @@ -94,7 +244,7 @@ export class PromiseListsApi { * @param listId The **ILS ID** of the list to fetch. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getByIdWithHttpInfo(listId: number, includeFilters?: boolean, _options?: Configuration): Promise> { + public getByIdWithHttpInfo(listId: string, includeFilters?: boolean, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(listId, includeFilters, _options); return result.toPromise(); } @@ -105,7 +255,7 @@ export class PromiseListsApi { * @param listId The **ILS ID** of the list to fetch. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public getById(listId: number, includeFilters?: boolean, _options?: Configuration): Promise { + public getById(listId: string, includeFilters?: boolean, _options?: Configuration): Promise { const result = this.api.getById(listId, includeFilters, _options); return result.toPromise(); } @@ -139,7 +289,7 @@ export class PromiseListsApi { * Delete a List * @param listId The **ILS ID** of the list to delete. */ - public removeWithHttpInfo(listId: number, _options?: Configuration): Promise> { + public removeWithHttpInfo(listId: string, _options?: Configuration): Promise> { const result = this.api.removeWithHttpInfo(listId, _options); return result.toPromise(); } @@ -149,7 +299,7 @@ export class PromiseListsApi { * Delete a List * @param listId The **ILS ID** of the list to delete. */ - public remove(listId: number, _options?: Configuration): Promise { + public remove(listId: string, _options?: Configuration): Promise { const result = this.api.remove(listId, _options); return result.toPromise(); } @@ -159,7 +309,7 @@ export class PromiseListsApi { * Restore a List * @param listId The **ILS ID** of the list to restore. */ - public restoreWithHttpInfo(listId: number, _options?: Configuration): Promise> { + public restoreWithHttpInfo(listId: string, _options?: Configuration): Promise> { const result = this.api.restoreWithHttpInfo(listId, _options); return result.toPromise(); } @@ -169,7 +319,7 @@ export class PromiseListsApi { * Restore a List * @param listId The **ILS ID** of the list to restore. */ - public restore(listId: number, _options?: Configuration): Promise { + public restore(listId: string, _options?: Configuration): Promise { const result = this.api.restore(listId, _options); return result.toPromise(); } @@ -181,7 +331,7 @@ export class PromiseListsApi { * @param listFilterUpdateRequest * @param enrollObjectsInWorkflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. */ - public updateListFiltersWithHttpInfo(listId: number, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise> { + public updateListFiltersWithHttpInfo(listId: string, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise> { const result = this.api.updateListFiltersWithHttpInfo(listId, listFilterUpdateRequest, enrollObjectsInWorkflows, _options); return result.toPromise(); } @@ -193,7 +343,7 @@ export class PromiseListsApi { * @param listFilterUpdateRequest * @param enrollObjectsInWorkflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. */ - public updateListFilters(listId: number, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise { + public updateListFilters(listId: string, listFilterUpdateRequest: ListFilterUpdateRequest, enrollObjectsInWorkflows?: boolean, _options?: Configuration): Promise { const result = this.api.updateListFilters(listId, listFilterUpdateRequest, enrollObjectsInWorkflows, _options); return result.toPromise(); } @@ -205,7 +355,7 @@ export class PromiseListsApi { * @param listName The name to update the list to. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public updateNameWithHttpInfo(listId: number, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise> { + public updateNameWithHttpInfo(listId: string, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise> { const result = this.api.updateNameWithHttpInfo(listId, listName, includeFilters, _options); return result.toPromise(); } @@ -217,7 +367,7 @@ export class PromiseListsApi { * @param listName The name to update the list to. * @param includeFilters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. */ - public updateName(listId: number, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise { + public updateName(listId: string, listName?: string, includeFilters?: boolean, _options?: Configuration): Promise { const result = this.api.updateName(listId, listName, includeFilters, _options); return result.toPromise(); } @@ -227,6 +377,65 @@ export class PromiseListsApi { +import { ObservableMappingApi } from './ObservableAPI'; + +import { MappingApiRequestFactory, MappingApiResponseProcessor} from "../apis/MappingApi"; +export class PromiseMappingApi { + private api: ObservableMappingApi + + public constructor( + configuration: Configuration, + requestFactory?: MappingApiRequestFactory, + responseProcessor?: MappingApiResponseProcessor + ) { + this.api = new ObservableMappingApi(configuration, requestFactory, responseProcessor); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param legacyListId The legacy list id from lists v1 API. + */ + public translateLegacyListIdToListIdWithHttpInfo(legacyListId?: string, _options?: Configuration): Promise> { + const result = this.api.translateLegacyListIdToListIdWithHttpInfo(legacyListId, _options); + return result.toPromise(); + } + + /** + * This API allows translation of legacy list id to list id. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id + * @param legacyListId The legacy list id from lists v1 API. + */ + public translateLegacyListIdToListId(legacyListId?: string, _options?: Configuration): Promise { + const result = this.api.translateLegacyListIdToListId(legacyListId, _options); + return result.toPromise(); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param requestBody + */ + public translateLegacyListIdToListIdBatchWithHttpInfo(requestBody: Array, _options?: Configuration): Promise> { + const result = this.api.translateLegacyListIdToListIdBatchWithHttpInfo(requestBody, _options); + return result.toPromise(); + } + + /** + * This API allows translation of a batch of legacy list id\'s to list id\'s. This allows for a maximum of 10,000 id\'s. This is a temporary API allowed for mapping old id\'s to new id\'s and will expire on May 30th, 2025. + * Translate Legacy List Id to Modern List Id in Batch + * @param requestBody + */ + public translateLegacyListIdToListIdBatch(requestBody: Array, _options?: Configuration): Promise { + const result = this.api.translateLegacyListIdToListIdBatch(requestBody, _options); + return result.toPromise(); + } + + +} + + + import { ObservableMembershipsApi } from './ObservableAPI'; import { MembershipsApiRequestFactory, MembershipsApiResponseProcessor} from "../apis/MembershipsApi"; @@ -245,9 +454,9 @@ export class PromiseMembershipsApi { * Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add Records to a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to add to the list. + * @param requestBody */ - public addWithHttpInfo(listId: number, requestBody: Array, _options?: Configuration): Promise> { + public addWithHttpInfo(listId: string, requestBody: Array, _options?: Configuration): Promise> { const result = this.api.addWithHttpInfo(listId, requestBody, _options); return result.toPromise(); } @@ -256,31 +465,31 @@ export class PromiseMembershipsApi { * Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add Records to a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to add to the list. + * @param requestBody */ - public add(listId: number, requestBody: Array, _options?: Configuration): Promise { + public add(listId: string, requestBody: Array, _options?: Configuration): Promise { const result = this.api.add(listId, requestBody, _options); return result.toPromise(); } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. * @param sourceListId The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. */ - public addAllFromListWithHttpInfo(listId: number, sourceListId: number, _options?: Configuration): Promise> { + public addAllFromListWithHttpInfo(listId: string, sourceListId: string, _options?: Configuration): Promise> { const result = this.api.addAllFromListWithHttpInfo(listId, sourceListId, _options); return result.toPromise(); } /** - * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. + * Add all of the records from a *source list* (specified by the `sourceListId`) to a *destination list* (specified by the `listId`). Records that are already members of the *destination list* will be ignored. The *destination* and *source list* IDs must be different. The *destination* and *source lists* must contain records of the same type (e.g. contacts, companies, etc.). This endpoint only works for *destination lists* that have a `processingType` of `MANUAL` or `SNAPSHOT`. The *source list* can have any `processingType`. This endpoint only supports a `sourceListId` for lists with less than 100,000 memberships. * Add All Records from a Source List to a Destination List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. * @param sourceListId The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. */ - public addAllFromList(listId: number, sourceListId: number, _options?: Configuration): Promise { + public addAllFromList(listId: string, sourceListId: string, _options?: Configuration): Promise { const result = this.api.addAllFromList(listId, sourceListId, _options); return result.toPromise(); } @@ -289,9 +498,9 @@ export class PromiseMembershipsApi { * Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add and/or Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param membershipChangeRequest The IDs of the records to add and/or remove from the list. + * @param membershipChangeRequest */ - public addAndRemoveWithHttpInfo(listId: number, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise> { + public addAndRemoveWithHttpInfo(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise> { const result = this.api.addAndRemoveWithHttpInfo(listId, membershipChangeRequest, _options); return result.toPromise(); } @@ -300,13 +509,35 @@ export class PromiseMembershipsApi { * Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Add and/or Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param membershipChangeRequest The IDs of the records to add and/or remove from the list. + * @param membershipChangeRequest */ - public addAndRemove(listId: number, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise { + public addAndRemove(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise { const result = this.api.addAndRemove(listId, membershipChangeRequest, _options); return result.toPromise(); } + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param objectTypeId Object type id of the record + * @param recordId Id of the record + */ + public getListsWithHttpInfo(objectTypeId: string, recordId: string, _options?: Configuration): Promise> { + const result = this.api.getListsWithHttpInfo(objectTypeId, recordId, _options); + return result.toPromise(); + } + + /** + * For given record provide lists this record is member of. + * Get lists record is member of + * @param objectTypeId Object type id of the record + * @param recordId Id of the record + */ + public getLists(objectTypeId: string, recordId: string, _options?: Configuration): Promise { + const result = this.api.getLists(objectTypeId, recordId, _options); + return result.toPromise(); + } + /** * Fetch the memberships of a list in order sorted by the `recordId` of the records in the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. * Fetch List Memberships Ordered by ID @@ -315,7 +546,7 @@ export class PromiseMembershipsApi { * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. * @param limit The number of records to return in the response. The maximum `limit` is 250. */ - public getPageWithHttpInfo(listId: number, after?: string, before?: string, limit?: number, _options?: Configuration): Promise> { + public getPageWithHttpInfo(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise> { const result = this.api.getPageWithHttpInfo(listId, after, before, limit, _options); return result.toPromise(); } @@ -328,18 +559,44 @@ export class PromiseMembershipsApi { * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. * @param limit The number of records to return in the response. The maximum `limit` is 250. */ - public getPage(listId: number, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { + public getPage(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { const result = this.api.getPage(listId, after, before, limit, _options); return result.toPromise(); } + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param listId The **ILS ID** of the list. + * @param after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @param limit The number of records to return in the response. The maximum `limit` is 250. + */ + public getPageOrderedByAddedToListDateWithHttpInfo(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise> { + const result = this.api.getPageOrderedByAddedToListDateWithHttpInfo(listId, after, before, limit, _options); + return result.toPromise(); + } + + /** + * Fetch the memberships of a list in order sorted by the time the records were added to the list. The `recordId`s are sorted in *ascending* order if an `after` offset or no offset is provided. If only a `before` offset is provided, then the records are sorted in *descending* order. The `after` offset parameter will take precedence over the `before` offset in a case where both are provided. + * Fetch List Memberships Ordered by Added to List Date + * @param listId The **ILS ID** of the list. + * @param after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. + * @param before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. + * @param limit The number of records to return in the response. The maximum `limit` is 250. + */ + public getPageOrderedByAddedToListDate(listId: string, after?: string, before?: string, limit?: number, _options?: Configuration): Promise { + const result = this.api.getPageOrderedByAddedToListDate(listId, after, before, limit, _options); + return result.toPromise(); + } + /** * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to remove from the list. + * @param requestBody */ - public removeWithHttpInfo(listId: number, requestBody: Array, _options?: Configuration): Promise> { + public removeWithHttpInfo(listId: string, requestBody: Array, _options?: Configuration): Promise> { const result = this.api.removeWithHttpInfo(listId, requestBody, _options); return result.toPromise(); } @@ -348,29 +605,29 @@ export class PromiseMembershipsApi { * Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. * Remove Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. - * @param requestBody The IDs of the records to remove from the list. + * @param requestBody */ - public remove(listId: number, requestBody: Array, _options?: Configuration): Promise { + public remove(listId: string, requestBody: Array, _options?: Configuration): Promise { const result = this.api.remove(listId, requestBody, _options); return result.toPromise(); } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. */ - public removeAllWithHttpInfo(listId: number, _options?: Configuration): Promise> { + public removeAllWithHttpInfo(listId: string, _options?: Configuration): Promise> { const result = this.api.removeAllWithHttpInfo(listId, _options); return result.toPromise(); } /** - * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. + * Remove **all** of the records from a list. ***Note:*** *The list is not deleted.* This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`. This endpoint only supports lists that have less than 100,000 memberships. * Delete All Records from a List * @param listId The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. */ - public removeAll(listId: number, _options?: Configuration): Promise { + public removeAll(listId: string, _options?: Configuration): Promise { const result = this.api.removeAll(listId, _options); return result.toPromise(); } From e30b3cbaa2d8a7c31e9cd1d3093d8b96853e65aa Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Mon, 9 Sep 2024 11:13:04 +0300 Subject: [PATCH 06/46] Update CRM Lists discoveries --- src/discovery/crm/lists/ListsDiscovery.ts | 6 ++++++ test/spec/crm/lists/lists.spec.ts | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/discovery/crm/lists/ListsDiscovery.ts b/src/discovery/crm/lists/ListsDiscovery.ts index b1bff6da5..780fdb2db 100644 --- a/src/discovery/crm/lists/ListsDiscovery.ts +++ b/src/discovery/crm/lists/ListsDiscovery.ts @@ -1,6 +1,8 @@ import { createConfiguration, + FoldersApi, ListsApi, + MappingApi, MembershipsApi, RequestContext, ResponseContext, @@ -12,7 +14,9 @@ import IConfiguration from '../../../configuration/IConfiguration' import ApiDecoratorService from '../../../services/ApiDecoratorService' export default class ListsDiscovery { + public foldersApi: FoldersApi public listsApi: ListsApi + public mappingApi: MappingApi public membershipsApi: MembershipsApi constructor(config: IConfiguration) { @@ -26,7 +30,9 @@ export default class ListsDiscovery { >(config, ServerConfiguration, Observable, Observable), ) + this.foldersApi = ApiDecoratorService.getInstance().apply(new FoldersApi(configuration)) this.listsApi = ApiDecoratorService.getInstance().apply(new ListsApi(configuration)) + this.mappingApi = ApiDecoratorService.getInstance().apply(new MappingApi(configuration)) this.membershipsApi = ApiDecoratorService.getInstance().apply(new MembershipsApi(configuration)) } } diff --git a/test/spec/crm/lists/lists.spec.ts b/test/spec/crm/lists/lists.spec.ts index 9194b40b3..d4e553ad1 100644 --- a/test/spec/crm/lists/lists.spec.ts +++ b/test/spec/crm/lists/lists.spec.ts @@ -1,11 +1,15 @@ -import { ListsApi, MembershipsApi } from '../../../../codegen/crm/lists/index' +import { FoldersApi, ListsApi, MappingApi, MembershipsApi } from '../../../../codegen/crm/lists/index' import { Client } from '../../../../index' describe('api client', () => { it('is discoverable', () => { const client = new Client().crm.lists + expect(client.hasOwnProperty('foldersApi')).toBeTruthy() + expect(FoldersApi.name).toBe(client.foldersApi.constructor.name) expect(client.hasOwnProperty('listsApi')).toBeTruthy() expect(ListsApi.name).toBe(client.listsApi.constructor.name) + expect(client.hasOwnProperty('mappingApi')).toBeTruthy() + expect(MappingApi.name).toBe(client.mappingApi.constructor.name) expect(client.hasOwnProperty('membershipsApi')).toBeTruthy() expect(MembershipsApi.name).toBe(client.membershipsApi.constructor.name) }) From 5a2b8ffa170a85de4bff4b048e93c447add4344f Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 12:04:56 +0300 Subject: [PATCH 07/46] Codegen: CRM Companies, Contacts and Deals --- codegen/crm/companies/apis/BasicApi.ts | 6 +- codegen/crm/companies/apis/BatchApi.ts | 96 ++++++++++++++++- codegen/crm/companies/apis/GDPRApi.ts | 102 ------------------ codegen/crm/companies/index.ts | 2 +- .../crm/companies/models/AssociationSpec.ts | 6 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 ++++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++++++++++ .../crm/companies/models/ObjectSerializer.ts | 20 +++- .../models/PublicAssociationsForObject.ts | 4 +- .../crm/companies/models/PublicObjectId.ts | 2 +- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 9 +- .../models/SimplePublicUpsertObject.ts | 84 +++++++++++++++ codegen/crm/companies/models/all.ts | 6 +- codegen/crm/companies/types/ObjectParamAPI.ts | 62 +++++------ codegen/crm/companies/types/ObservableAPI.ts | 60 ++++------- codegen/crm/companies/types/PromiseAPI.ts | 59 ++++------ codegen/crm/contacts/apis/BasicApi.ts | 2 +- codegen/crm/contacts/apis/BatchApi.ts | 96 ++++++++++++++++- .../crm/contacts/models/AssociationSpec.ts | 4 +- ...InputSimplePublicObjectBatchInputUpsert.ts | 35 ++++++ .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 ++++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++++++++++ .../crm/contacts/models/ObjectSerializer.ts | 17 +++ .../models/PublicAssociationsForObject.ts | 4 +- .../contacts/models/PublicGdprDeleteInput.ts | 3 + codegen/crm/contacts/models/PublicObjectId.ts | 2 +- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 9 +- .../models/SimplePublicUpsertObject.ts | 84 +++++++++++++++ codegen/crm/contacts/models/all.ts | 5 + codegen/crm/contacts/types/ObjectParamAPI.ts | 38 ++++++- codegen/crm/contacts/types/ObservableAPI.ts | 44 +++++++- codegen/crm/contacts/types/PromiseAPI.ts | 31 +++++- codegen/crm/deals/apis/BasicApi.ts | 6 +- codegen/crm/deals/apis/BatchApi.ts | 96 ++++++++++++++++- codegen/crm/deals/apis/GDPRApi.ts | 102 ------------------ codegen/crm/deals/index.ts | 2 +- codegen/crm/deals/models/AssociationSpec.ts | 4 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 ++++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++++++++++ codegen/crm/deals/models/ObjectSerializer.ts | 20 +++- .../models/PublicAssociationsForObject.ts | 4 +- codegen/crm/deals/models/PublicObjectId.ts | 2 +- .../deals/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../deals/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 9 +- .../deals/models/SimplePublicUpsertObject.ts | 84 +++++++++++++++ codegen/crm/deals/models/all.ts | 6 +- codegen/crm/deals/types/ObjectParamAPI.ts | 62 +++++------ codegen/crm/deals/types/ObservableAPI.ts | 60 ++++------- codegen/crm/deals/types/PromiseAPI.ts | 59 ++++------ 65 files changed, 1714 insertions(+), 520 deletions(-) delete mode 100644 codegen/crm/companies/apis/GDPRApi.ts rename codegen/crm/companies/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/companies/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/companies/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts create mode 100644 codegen/crm/companies/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/companies/models/SimplePublicUpsertObject.ts create mode 100644 codegen/crm/contacts/models/BatchInputSimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts create mode 100644 codegen/crm/contacts/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/contacts/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/deals/apis/GDPRApi.ts rename codegen/crm/deals/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/deals/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/deals/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts create mode 100644 codegen/crm/deals/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/deals/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/companies/apis/BasicApi.ts b/codegen/crm/companies/apis/BasicApi.ts index f9ce4b1bb..f5017b1bb 100644 --- a/codegen/crm/companies/apis/BasicApi.ts +++ b/codegen/crm/companies/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(companyId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param companyId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(companyId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/companies/apis/BatchApi.ts b/codegen/crm/companies/apis/BatchApi.ts index cd3f5537f..34ac09ceb 100644 --- a/codegen/crm/companies/apis/BatchApi.ts +++ b/codegen/crm/companies/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/companies/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/companies/apis/GDPRApi.ts b/codegen/crm/companies/apis/GDPRApi.ts deleted file mode 100644 index 9e88e8352..000000000 --- a/codegen/crm/companies/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/companies/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/companies/index.ts b/codegen/crm/companies/index.ts index 57d6524bf..c006a45c0 100644 --- a/codegen/crm/companies/index.ts +++ b/codegen/crm/companies/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/companies/models/AssociationSpec.ts b/codegen/crm/companies/models/AssociationSpec.ts index 8ada39c3c..b3fca7bc3 100644 --- a/codegen/crm/companies/models/AssociationSpec.ts +++ b/codegen/crm/companies/models/AssociationSpec.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,8 +12,8 @@ export class AssociationSpec { - 'associationCategory': AssociationSpecAssociationCategoryEnum; - 'associationTypeId': number; + 'associationCategory'?: AssociationSpecAssociationCategoryEnum; + 'associationTypeId'?: number; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/companies/models/PublicGdprDeleteInput.ts b/codegen/crm/companies/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/companies/models/PublicGdprDeleteInput.ts rename to codegen/crm/companies/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 2d500b7c9..1989dfe5e 100644 --- a/codegen/crm/companies/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/companies/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/companies/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/companies/models/BatchReadInputSimplePublicObjectId.ts index cba9d1d50..e4bcfe671 100644 --- a/codegen/crm/companies/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/companies/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..0648a3c3d --- /dev/null +++ b/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Companies + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..18a66a70a --- /dev/null +++ b/codegen/crm/companies/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Companies + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/companies/models/ObjectSerializer.ts b/codegen/crm/companies/models/ObjectSerializer.ts index 78bbe565d..449b7b328 100644 --- a/codegen/crm/companies/models/ObjectSerializer.ts +++ b/codegen/crm/companies/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,31 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +58,17 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +88,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +97,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +117,17 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/companies/models/PublicAssociationsForObject.ts b/codegen/crm/companies/models/PublicAssociationsForObject.ts index aa1852bd8..d78972194 100644 --- a/codegen/crm/companies/models/PublicAssociationsForObject.ts +++ b/codegen/crm/companies/models/PublicAssociationsForObject.ts @@ -14,8 +14,8 @@ import { AssociationSpec } from '../models/AssociationSpec'; import { PublicObjectId } from '../models/PublicObjectId'; export class PublicAssociationsForObject { - 'types': Array; - 'to': PublicObjectId; + 'types'?: Array; + 'to'?: PublicObjectId; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/companies/models/PublicObjectId.ts b/codegen/crm/companies/models/PublicObjectId.ts index 133110010..568ffdd0a 100644 --- a/codegen/crm/companies/models/PublicObjectId.ts +++ b/codegen/crm/companies/models/PublicObjectId.ts @@ -12,7 +12,7 @@ export class PublicObjectId { - 'id': string; + 'id'?: string; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/companies/models/PublicObjectSearchRequest.ts b/codegen/crm/companies/models/PublicObjectSearchRequest.ts index 747e33dee..7d78bdec2 100644 --- a/codegen/crm/companies/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/companies/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/companies/models/SimplePublicObjectBatchInput.ts b/codegen/crm/companies/models/SimplePublicObjectBatchInput.ts index 86a5e5f4f..f649726cd 100644 --- a/codegen/crm/companies/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/companies/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/companies/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/companies/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..ccc06bde2 --- /dev/null +++ b/codegen/crm/companies/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Companies + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/companies/models/SimplePublicObjectInput.ts b/codegen/crm/companies/models/SimplePublicObjectInput.ts index cad989e5f..b1f8f8b86 100644 --- a/codegen/crm/companies/models/SimplePublicObjectInput.ts +++ b/codegen/crm/companies/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/companies/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/companies/models/SimplePublicObjectInputForCreate.ts index 5648f89d6..ffeb58b53 100644 --- a/codegen/crm/companies/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/companies/models/SimplePublicObjectInputForCreate.ts @@ -13,7 +13,8 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; export class SimplePublicObjectInputForCreate { - 'associations': Array; + 'associations'?: Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/companies/models/SimplePublicUpsertObject.ts b/codegen/crm/companies/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..73a6a107e --- /dev/null +++ b/codegen/crm/companies/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Companies + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/companies/models/all.ts b/codegen/crm/companies/models/all.ts index 16a8dee1d..d39088c77 100644 --- a/codegen/crm/companies/models/all.ts +++ b/codegen/crm/companies/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,16 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/companies/types/ObjectParamAPI.ts b/codegen/crm/companies/types/ObjectParamAPI.ts index fbc14079b..19174e799 100644 --- a/codegen/crm/companies/types/ObjectParamAPI.ts +++ b/codegen/crm/companies/types/ObjectParamAPI.ts @@ -2,14 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -70,7 +72,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +132,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +219,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +228,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +283,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +348,7 @@ export class ObjectBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,50 +356,29 @@ export class ObjectBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values * @param param the request object */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values * @param param the request object */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/companies/types/ObservableAPI.ts b/codegen/crm/companies/types/ObservableAPI.ts index ae98a67a1..4b8b108b9 100644 --- a/codegen/crm/companies/types/ObservableAPI.ts +++ b/codegen/crm/companies/types/ObservableAPI.ts @@ -3,14 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -108,7 +110,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(companyId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(companyId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +139,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(companyId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(companyId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +189,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param companyId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(companyId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(companyId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +215,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param companyId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(companyId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(companyId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +339,7 @@ export class ObservableBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,38 +362,20 @@ export class ObservableBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -405,17 +389,17 @@ export class ObservableGDPRApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/companies/types/PromiseAPI.ts b/codegen/crm/companies/types/PromiseAPI.ts index a62fb9247..7cf1f533f 100644 --- a/codegen/crm/companies/types/PromiseAPI.ts +++ b/codegen/crm/companies/types/PromiseAPI.ts @@ -2,14 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -78,7 +80,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(companyId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(companyId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +95,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(companyId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(companyId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +133,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param companyId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(companyId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(companyId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +145,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{companyId}`. `{companyId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{companyId}`or optionally a unique property value as specified by the `idProperty` query param. `{companyId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param companyId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(companyId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(companyId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +232,7 @@ export class PromiseBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +241,7 @@ export class PromiseBatchApi { } /** - * Update a batch of companies + * Update a batch of companies by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,42 +249,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of companies by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/contacts/apis/BasicApi.ts b/codegen/crm/contacts/apis/BasicApi.ts index 4c92c9204..347363013 100644 --- a/codegen/crm/contacts/apis/BasicApi.ts +++ b/codegen/crm/contacts/apis/BasicApi.ts @@ -251,7 +251,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param contactId * @param simplePublicObjectInput diff --git a/codegen/crm/contacts/apis/BatchApi.ts b/codegen/crm/contacts/apis/BatchApi.ts index 7d725fd44..d3f1816e1 100644 --- a/codegen/crm/contacts/apis/BatchApi.ts +++ b/codegen/crm/contacts/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/contacts/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/contacts/models/AssociationSpec.ts b/codegen/crm/contacts/models/AssociationSpec.ts index 5b9e5c045..f3533873c 100644 --- a/codegen/crm/contacts/models/AssociationSpec.ts +++ b/codegen/crm/contacts/models/AssociationSpec.ts @@ -12,8 +12,8 @@ export class AssociationSpec { - 'associationCategory': AssociationSpecAssociationCategoryEnum; - 'associationTypeId': number; + 'associationCategory'?: AssociationSpecAssociationCategoryEnum; + 'associationTypeId'?: number; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/contacts/models/BatchInputSimplePublicObjectBatchInputUpsert.ts b/codegen/crm/contacts/models/BatchInputSimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..5100ff056 --- /dev/null +++ b/codegen/crm/contacts/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,35 @@ +/** + * Contacts + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; + +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "inputs", + "baseName": "inputs", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/contacts/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/contacts/models/BatchReadInputSimplePublicObjectId.ts index 432082d8d..23050f126 100644 --- a/codegen/crm/contacts/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/contacts/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..49df7e32c --- /dev/null +++ b/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Contacts + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..3e3ca4c18 --- /dev/null +++ b/codegen/crm/contacts/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Contacts + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/contacts/models/ObjectSerializer.ts b/codegen/crm/contacts/models/ObjectSerializer.ts index 78bbe565d..f53496e99 100644 --- a/codegen/crm/contacts/models/ObjectSerializer.ts +++ b/codegen/crm/contacts/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -24,21 +27,26 @@ export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -57,10 +65,12 @@ import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +90,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +99,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -110,10 +125,12 @@ let typeMap: {[index: string]: any} = { "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/contacts/models/PublicAssociationsForObject.ts b/codegen/crm/contacts/models/PublicAssociationsForObject.ts index e72692742..25fb573e1 100644 --- a/codegen/crm/contacts/models/PublicAssociationsForObject.ts +++ b/codegen/crm/contacts/models/PublicAssociationsForObject.ts @@ -14,8 +14,8 @@ import { AssociationSpec } from '../models/AssociationSpec'; import { PublicObjectId } from '../models/PublicObjectId'; export class PublicAssociationsForObject { - 'types': Array; - 'to': PublicObjectId; + 'types'?: Array; + 'to'?: PublicObjectId; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/contacts/models/PublicGdprDeleteInput.ts b/codegen/crm/contacts/models/PublicGdprDeleteInput.ts index 8316abb7d..ef012aed3 100644 --- a/codegen/crm/contacts/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/contacts/models/PublicGdprDeleteInput.ts @@ -12,6 +12,9 @@ export class PublicGdprDeleteInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'objectId': string; diff --git a/codegen/crm/contacts/models/PublicObjectId.ts b/codegen/crm/contacts/models/PublicObjectId.ts index 4d351552d..422f977e8 100644 --- a/codegen/crm/contacts/models/PublicObjectId.ts +++ b/codegen/crm/contacts/models/PublicObjectId.ts @@ -12,7 +12,7 @@ export class PublicObjectId { - 'id': string; + 'id'?: string; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/contacts/models/PublicObjectSearchRequest.ts b/codegen/crm/contacts/models/PublicObjectSearchRequest.ts index f18529ce2..098f32c47 100644 --- a/codegen/crm/contacts/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/contacts/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/contacts/models/SimplePublicObjectBatchInput.ts b/codegen/crm/contacts/models/SimplePublicObjectBatchInput.ts index dd259fc7d..702c96b34 100644 --- a/codegen/crm/contacts/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/contacts/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/contacts/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/contacts/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..d79f60940 --- /dev/null +++ b/codegen/crm/contacts/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Contacts + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/contacts/models/SimplePublicObjectInput.ts b/codegen/crm/contacts/models/SimplePublicObjectInput.ts index 202ef36fa..fd5ab48f7 100644 --- a/codegen/crm/contacts/models/SimplePublicObjectInput.ts +++ b/codegen/crm/contacts/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/contacts/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/contacts/models/SimplePublicObjectInputForCreate.ts index 5c7dc7ea8..0bd88001d 100644 --- a/codegen/crm/contacts/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/contacts/models/SimplePublicObjectInputForCreate.ts @@ -13,7 +13,8 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; export class SimplePublicObjectInputForCreate { - 'associations': Array; + 'associations'?: Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/contacts/models/SimplePublicUpsertObject.ts b/codegen/crm/contacts/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..05f738777 --- /dev/null +++ b/codegen/crm/contacts/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Contacts + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/contacts/models/all.ts b/codegen/crm/contacts/models/all.ts index 16a8dee1d..0807f5cce 100644 --- a/codegen/crm/contacts/models/all.ts +++ b/codegen/crm/contacts/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -24,9 +27,11 @@ export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/contacts/types/ObjectParamAPI.ts b/codegen/crm/contacts/types/ObjectParamAPI.ts index 24cfaec4c..9df5a1d41 100644 --- a/codegen/crm/contacts/types/ObjectParamAPI.ts +++ b/codegen/crm/contacts/types/ObjectParamAPI.ts @@ -2,11 +2,14 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; @@ -217,7 +220,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +229,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +284,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +349,7 @@ export class ObjectBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,13 +357,31 @@ export class ObjectBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param param the request object + */ + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); + } + + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param param the request object + */ + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); + } + } import { ObservableGDPRApi } from "./ObservableAPI"; diff --git a/codegen/crm/contacts/types/ObservableAPI.ts b/codegen/crm/contacts/types/ObservableAPI.ts index 2f9da8703..23d980950 100644 --- a/codegen/crm/contacts/types/ObservableAPI.ts +++ b/codegen/crm/contacts/types/ObservableAPI.ts @@ -3,11 +3,14 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; @@ -187,7 +190,7 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param contactId * @param simplePublicObjectInput @@ -213,7 +216,7 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param contactId * @param simplePublicObjectInput @@ -337,7 +340,7 @@ export class ObservableBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,13 +363,46 @@ export class ObservableBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); + })); + } + + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + } import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; diff --git a/codegen/crm/contacts/types/PromiseAPI.ts b/codegen/crm/contacts/types/PromiseAPI.ts index 16e59dcf5..23d9f5908 100644 --- a/codegen/crm/contacts/types/PromiseAPI.ts +++ b/codegen/crm/contacts/types/PromiseAPI.ts @@ -2,11 +2,14 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; @@ -131,7 +134,7 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param contactId * @param simplePublicObjectInput @@ -143,7 +146,7 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{contactId}`. `{contactId}` refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties result in an error. Properties values can be cleared by passing an empty string. * Update * @param contactId * @param simplePublicObjectInput @@ -230,7 +233,7 @@ export class PromiseBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +242,7 @@ export class PromiseBatchApi { } /** - * Update a batch of contacts + * Update a batch of contacts by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,6 +250,26 @@ export class PromiseBatchApi { return result.toPromise(); } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); + return result.toPromise(); + } + + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of contacts by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); + return result.toPromise(); + } + } diff --git a/codegen/crm/deals/apis/BasicApi.ts b/codegen/crm/deals/apis/BasicApi.ts index 34ffb4263..fa9272973 100644 --- a/codegen/crm/deals/apis/BasicApi.ts +++ b/codegen/crm/deals/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(dealId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param dealId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(dealId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/deals/apis/BatchApi.ts b/codegen/crm/deals/apis/BatchApi.ts index 0b2aad111..7be7b4992 100644 --- a/codegen/crm/deals/apis/BatchApi.ts +++ b/codegen/crm/deals/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/deals/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/deals/apis/GDPRApi.ts b/codegen/crm/deals/apis/GDPRApi.ts deleted file mode 100644 index 1a8135dae..000000000 --- a/codegen/crm/deals/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/deals/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/deals/index.ts b/codegen/crm/deals/index.ts index 57d6524bf..c006a45c0 100644 --- a/codegen/crm/deals/index.ts +++ b/codegen/crm/deals/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/deals/models/AssociationSpec.ts b/codegen/crm/deals/models/AssociationSpec.ts index 942a31b44..c84b8b0a7 100644 --- a/codegen/crm/deals/models/AssociationSpec.ts +++ b/codegen/crm/deals/models/AssociationSpec.ts @@ -12,8 +12,8 @@ export class AssociationSpec { - 'associationCategory': AssociationSpecAssociationCategoryEnum; - 'associationTypeId': number; + 'associationCategory'?: AssociationSpecAssociationCategoryEnum; + 'associationTypeId'?: number; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/deals/models/PublicGdprDeleteInput.ts b/codegen/crm/deals/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/deals/models/PublicGdprDeleteInput.ts rename to codegen/crm/deals/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 47e761978..87baa2c4a 100644 --- a/codegen/crm/deals/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/deals/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/deals/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/deals/models/BatchReadInputSimplePublicObjectId.ts index c45b37900..3c75f42ce 100644 --- a/codegen/crm/deals/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/deals/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..9eecd3a40 --- /dev/null +++ b/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Deals + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..e44f6b0bc --- /dev/null +++ b/codegen/crm/deals/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Deals + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/deals/models/ObjectSerializer.ts b/codegen/crm/deals/models/ObjectSerializer.ts index 78bbe565d..449b7b328 100644 --- a/codegen/crm/deals/models/ObjectSerializer.ts +++ b/codegen/crm/deals/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,31 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +58,17 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +88,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +97,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +117,17 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/deals/models/PublicAssociationsForObject.ts b/codegen/crm/deals/models/PublicAssociationsForObject.ts index f227ec436..f09430071 100644 --- a/codegen/crm/deals/models/PublicAssociationsForObject.ts +++ b/codegen/crm/deals/models/PublicAssociationsForObject.ts @@ -14,8 +14,8 @@ import { AssociationSpec } from '../models/AssociationSpec'; import { PublicObjectId } from '../models/PublicObjectId'; export class PublicAssociationsForObject { - 'types': Array; - 'to': PublicObjectId; + 'types'?: Array; + 'to'?: PublicObjectId; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/deals/models/PublicObjectId.ts b/codegen/crm/deals/models/PublicObjectId.ts index 6e3360170..7255652e1 100644 --- a/codegen/crm/deals/models/PublicObjectId.ts +++ b/codegen/crm/deals/models/PublicObjectId.ts @@ -12,7 +12,7 @@ export class PublicObjectId { - 'id': string; + 'id'?: string; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/deals/models/PublicObjectSearchRequest.ts b/codegen/crm/deals/models/PublicObjectSearchRequest.ts index 487a86cc7..034337b51 100644 --- a/codegen/crm/deals/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/deals/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/deals/models/SimplePublicObjectBatchInput.ts b/codegen/crm/deals/models/SimplePublicObjectBatchInput.ts index 60fd739e0..ccf51dd79 100644 --- a/codegen/crm/deals/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/deals/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/deals/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/deals/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..cd035ddfb --- /dev/null +++ b/codegen/crm/deals/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Deals + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/deals/models/SimplePublicObjectInput.ts b/codegen/crm/deals/models/SimplePublicObjectInput.ts index 4679719ac..c8f33c15c 100644 --- a/codegen/crm/deals/models/SimplePublicObjectInput.ts +++ b/codegen/crm/deals/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/deals/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/deals/models/SimplePublicObjectInputForCreate.ts index 442431ce3..e931d3976 100644 --- a/codegen/crm/deals/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/deals/models/SimplePublicObjectInputForCreate.ts @@ -13,7 +13,8 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; export class SimplePublicObjectInputForCreate { - 'associations': Array; + 'associations'?: Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/deals/models/SimplePublicUpsertObject.ts b/codegen/crm/deals/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..57290ed61 --- /dev/null +++ b/codegen/crm/deals/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Deals + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/deals/models/all.ts b/codegen/crm/deals/models/all.ts index 16a8dee1d..d39088c77 100644 --- a/codegen/crm/deals/models/all.ts +++ b/codegen/crm/deals/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,16 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/deals/types/ObjectParamAPI.ts b/codegen/crm/deals/types/ObjectParamAPI.ts index 735e93179..b3806f8ef 100644 --- a/codegen/crm/deals/types/ObjectParamAPI.ts +++ b/codegen/crm/deals/types/ObjectParamAPI.ts @@ -2,14 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -70,7 +72,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +132,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +219,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +228,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +283,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +348,7 @@ export class ObjectBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,50 +356,29 @@ export class ObjectBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values * @param param the request object */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values * @param param the request object */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/deals/types/ObservableAPI.ts b/codegen/crm/deals/types/ObservableAPI.ts index 770230b4e..9b0f06e2a 100644 --- a/codegen/crm/deals/types/ObservableAPI.ts +++ b/codegen/crm/deals/types/ObservableAPI.ts @@ -3,14 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -108,7 +110,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(dealId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(dealId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +139,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(dealId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(dealId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +189,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param dealId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(dealId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(dealId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +215,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param dealId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(dealId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(dealId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +339,7 @@ export class ObservableBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,38 +362,20 @@ export class ObservableBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -405,17 +389,17 @@ export class ObservableGDPRApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/deals/types/PromiseAPI.ts b/codegen/crm/deals/types/PromiseAPI.ts index a6b9cdc40..261c6258c 100644 --- a/codegen/crm/deals/types/PromiseAPI.ts +++ b/codegen/crm/deals/types/PromiseAPI.ts @@ -2,14 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; @@ -78,7 +80,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(dealId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(dealId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +95,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(dealId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(dealId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +133,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param dealId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(dealId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(dealId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +145,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{dealId}`. `{dealId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{dealId}`or optionally a unique property value as specified by the `idProperty` query param. `{dealId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param dealId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(dealId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(dealId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +232,7 @@ export class PromiseBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +241,7 @@ export class PromiseBatchApi { } /** - * Update a batch of deals + * Update a batch of deals by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,42 +249,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of deals by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } From ef10883ab944066d4f83aa750f390cb9868a80cf Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 12:12:39 +0300 Subject: [PATCH 08/46] Update CRM Companies and Deals discoveries --- src/discovery/crm/companies/CompaniesDiscovery.ts | 3 --- src/discovery/crm/deals/DealsDiscovery.ts | 3 --- test/spec/crm/companies/companies.spec.ts | 4 +--- test/spec/crm/deals/deals.spec.ts | 4 +--- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/discovery/crm/companies/CompaniesDiscovery.ts b/src/discovery/crm/companies/CompaniesDiscovery.ts index 373acb134..d9e940b9f 100644 --- a/src/discovery/crm/companies/CompaniesDiscovery.ts +++ b/src/discovery/crm/companies/CompaniesDiscovery.ts @@ -3,7 +3,6 @@ import { BatchApi, Configuration, createConfiguration, - GDPRApi, PublicObjectApi, RequestContext, ResponseContext, @@ -20,7 +19,6 @@ import { getAll } from '../../../services/getAll' export default class CompaniesDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi public publicObjectApi: PublicObjectApi public searchApi: SearchApi @@ -37,7 +35,6 @@ export default class CompaniesDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } diff --git a/src/discovery/crm/deals/DealsDiscovery.ts b/src/discovery/crm/deals/DealsDiscovery.ts index 4375f9add..f6413c5dc 100644 --- a/src/discovery/crm/deals/DealsDiscovery.ts +++ b/src/discovery/crm/deals/DealsDiscovery.ts @@ -3,7 +3,6 @@ import { BatchApi, Configuration, createConfiguration, - GDPRApi, PublicObjectApi, RequestContext, ResponseContext, @@ -20,7 +19,6 @@ import { getAll } from '../../../services/getAll' export default class DealsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi public publicObjectApi: PublicObjectApi public searchApi: SearchApi @@ -37,7 +35,6 @@ export default class DealsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } diff --git a/test/spec/crm/companies/companies.spec.ts b/test/spec/crm/companies/companies.spec.ts index 9408c71d1..418fe4456 100644 --- a/test/spec/crm/companies/companies.spec.ts +++ b/test/spec/crm/companies/companies.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/companies/index' +import { BasicApi, BatchApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/companies/index' import { Client } from '../../../../index' describe('api client', () => { @@ -8,8 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() diff --git a/test/spec/crm/deals/deals.spec.ts b/test/spec/crm/deals/deals.spec.ts index ddc36760d..5937625b2 100644 --- a/test/spec/crm/deals/deals.spec.ts +++ b/test/spec/crm/deals/deals.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/deals/index' +import { BasicApi, BatchApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/deals/index' import { Client } from '../../../../index' describe('api client', () => { @@ -8,8 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() From 348ffe148a6fa7601fb291721270c45e9444668e Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 12:37:50 +0300 Subject: [PATCH 09/46] Codegen: CRM Extentions --- .../accounting/apis/CallbacksApi.ts | 910 ------------------ .../extensions/accounting/apis/InvoiceApi.ts | 314 ------ .../extensions/accounting/apis/SettingsApi.ts | 172 ---- .../crm/extensions/accounting/apis/SyncApi.ts | 208 ---- .../accounting/apis/UserAccountsApi.ts | 172 ---- .../crm/extensions/accounting/apis/baseapi.ts | 37 - .../extensions/accounting/apis/exception.ts | 15 - .../crm/extensions/accounting/auth/auth.ts | 79 -- .../extensions/accounting/configuration.ts | 82 -- .../crm/extensions/accounting/http/http.ts | 247 ----- .../accounting/http/isomorphic-fetch.ts | 32 - codegen/crm/extensions/accounting/index.ts | 12 - .../crm/extensions/accounting/middleware.ts | 66 -- .../models/AccountingAppSettings.ts | 56 -- .../accounting/models/AccountingAppUrls.ts | 174 ---- .../models/AccountingExtensionCustomer.ts | 78 -- .../models/AccountingExtensionInvoice.ts | 130 --- .../models/AccountingExtensionTerm.ts | 70 -- .../accounting/models/AccountingFeatures.ts | 57 -- .../accounting/models/ActionResponse.ts | 70 -- .../extensions/accounting/models/Address.ts | 80 -- .../accounting/models/CreateInvoiceFeature.ts | 48 - .../models/CreateInvoiceSubFeatures.ts | 90 -- .../CreateUserAccountRequestExternal.ts | 60 -- .../models/CustomerSearchResponseExternal.ts | 57 -- .../accounting/models/ErrorDetail.ts | 77 -- .../accounting/models/ExchangeRateResponse.ts | 76 -- .../accounting/models/ImportInvoiceFeature.ts | 40 - .../models/InvoiceCreatePaymentRequest.ts | 67 -- .../accounting/models/InvoicePdfResponse.ts | 56 -- .../accounting/models/InvoiceReadResponse.ts | 196 ---- .../models/InvoiceSearchResponse.ts | 57 -- .../accounting/models/InvoiceUpdateRequest.ts | 104 -- .../models/InvoiceUpdateResponse.ts | 151 --- .../models/InvoicesResponseExternal.ts | 57 -- .../accounting/models/ModelError.ts | 98 -- .../accounting/models/ObjectSerializer.ts | 387 -------- .../accounting/models/ObjectSyncFeature.ts | 37 - .../extensions/accounting/models/Product.ts | 86 -- .../models/ProductSearchResponse.ts | 57 -- .../models/ResultIdAccountingResponse.ts | 56 -- .../accounting/models/SyncContactsRequest.ts | 51 - .../accounting/models/SyncProductsRequest.ts | 51 - .../crm/extensions/accounting/models/Tax.ts | 60 -- .../accounting/models/TaxSearchResponse.ts | 57 -- .../extensions/accounting/models/TaxType.ts | 50 - .../accounting/models/TermsResponse.ts | 57 -- .../extensions/accounting/models/UnitPrice.ts | 50 - .../accounting/models/UpdatedContact.ts | 91 -- .../accounting/models/UpdatedProduct.ts | 97 -- .../crm/extensions/accounting/models/all.ts | 36 - codegen/crm/extensions/accounting/rxjsStub.ts | 27 - codegen/crm/extensions/accounting/servers.ts | 55 -- .../accounting/types/ObjectParamAPI.ts | 702 -------------- .../accounting/types/ObservableAPI.ts | 775 --------------- .../extensions/accounting/types/PromiseAPI.ts | 532 ---------- codegen/crm/extensions/accounting/util.ts | 37 - .../calling/apis/RecordingSettingsApi.ts | 93 +- .../extensions/calling/apis/SettingsApi.ts | 12 +- codegen/crm/extensions/calling/auth/auth.ts | 32 +- .../extensions/calling/models/ErrorDetail.ts | 4 +- .../models/MarkRecordingAsReadyRequest.ts | 34 + .../extensions/calling/models/ModelError.ts | 4 +- .../calling/models/ObjectSerializer.ts | 3 + .../models/RecordingSettingsPatchRequest.ts | 4 +- .../models/RecordingSettingsRequest.ts | 4 +- .../models/RecordingSettingsResponse.ts | 4 +- .../calling/models/SettingsPatchRequest.ts | 14 +- .../calling/models/SettingsRequest.ts | 14 +- .../calling/models/SettingsResponse.ts | 14 +- codegen/crm/extensions/calling/models/all.ts | 1 + .../calling/types/ObjectParamAPI.ts | 58 +- .../extensions/calling/types/ObservableAPI.ts | 82 +- .../extensions/calling/types/PromiseAPI.ts | 69 +- .../cards/models/ActionConfirmationBody.ts | 14 +- .../cards/models/ActionHookActionBody.ts | 36 +- .../IntegratorObjectResultActionsInner.ts | 36 +- .../cards/models/ObjectSerializer.ts | 4 +- 78 files changed, 410 insertions(+), 7772 deletions(-) delete mode 100644 codegen/crm/extensions/accounting/apis/CallbacksApi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/InvoiceApi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/SettingsApi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/SyncApi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/UserAccountsApi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/baseapi.ts delete mode 100644 codegen/crm/extensions/accounting/apis/exception.ts delete mode 100644 codegen/crm/extensions/accounting/auth/auth.ts delete mode 100644 codegen/crm/extensions/accounting/configuration.ts delete mode 100644 codegen/crm/extensions/accounting/http/http.ts delete mode 100644 codegen/crm/extensions/accounting/http/isomorphic-fetch.ts delete mode 100644 codegen/crm/extensions/accounting/index.ts delete mode 100644 codegen/crm/extensions/accounting/middleware.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingAppSettings.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingAppUrls.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingExtensionCustomer.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingExtensionInvoice.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingExtensionTerm.ts delete mode 100644 codegen/crm/extensions/accounting/models/AccountingFeatures.ts delete mode 100644 codegen/crm/extensions/accounting/models/ActionResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/Address.ts delete mode 100644 codegen/crm/extensions/accounting/models/CreateInvoiceFeature.ts delete mode 100644 codegen/crm/extensions/accounting/models/CreateInvoiceSubFeatures.ts delete mode 100644 codegen/crm/extensions/accounting/models/CreateUserAccountRequestExternal.ts delete mode 100644 codegen/crm/extensions/accounting/models/CustomerSearchResponseExternal.ts delete mode 100644 codegen/crm/extensions/accounting/models/ErrorDetail.ts delete mode 100644 codegen/crm/extensions/accounting/models/ExchangeRateResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/ImportInvoiceFeature.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoiceCreatePaymentRequest.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoicePdfResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoiceReadResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoiceSearchResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoiceUpdateRequest.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoiceUpdateResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/InvoicesResponseExternal.ts delete mode 100644 codegen/crm/extensions/accounting/models/ModelError.ts delete mode 100644 codegen/crm/extensions/accounting/models/ObjectSerializer.ts delete mode 100644 codegen/crm/extensions/accounting/models/ObjectSyncFeature.ts delete mode 100644 codegen/crm/extensions/accounting/models/Product.ts delete mode 100644 codegen/crm/extensions/accounting/models/ProductSearchResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/ResultIdAccountingResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/SyncContactsRequest.ts delete mode 100644 codegen/crm/extensions/accounting/models/SyncProductsRequest.ts delete mode 100644 codegen/crm/extensions/accounting/models/Tax.ts delete mode 100644 codegen/crm/extensions/accounting/models/TaxSearchResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/TaxType.ts delete mode 100644 codegen/crm/extensions/accounting/models/TermsResponse.ts delete mode 100644 codegen/crm/extensions/accounting/models/UnitPrice.ts delete mode 100644 codegen/crm/extensions/accounting/models/UpdatedContact.ts delete mode 100644 codegen/crm/extensions/accounting/models/UpdatedProduct.ts delete mode 100644 codegen/crm/extensions/accounting/models/all.ts delete mode 100644 codegen/crm/extensions/accounting/rxjsStub.ts delete mode 100644 codegen/crm/extensions/accounting/servers.ts delete mode 100644 codegen/crm/extensions/accounting/types/ObjectParamAPI.ts delete mode 100644 codegen/crm/extensions/accounting/types/ObservableAPI.ts delete mode 100644 codegen/crm/extensions/accounting/types/PromiseAPI.ts delete mode 100644 codegen/crm/extensions/accounting/util.ts create mode 100644 codegen/crm/extensions/calling/models/MarkRecordingAsReadyRequest.ts diff --git a/codegen/crm/extensions/accounting/apis/CallbacksApi.ts b/codegen/crm/extensions/accounting/apis/CallbacksApi.ts deleted file mode 100644 index 12ecfc387..000000000 --- a/codegen/crm/extensions/accounting/apis/CallbacksApi.ts +++ /dev/null @@ -1,910 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { CustomerSearchResponseExternal } from '../models/CustomerSearchResponseExternal'; -import { ExchangeRateResponse } from '../models/ExchangeRateResponse'; -import { InvoicePdfResponse } from '../models/InvoicePdfResponse'; -import { InvoiceSearchResponse } from '../models/InvoiceSearchResponse'; -import { InvoicesResponseExternal } from '../models/InvoicesResponseExternal'; -import { ProductSearchResponse } from '../models/ProductSearchResponse'; -import { ResultIdAccountingResponse } from '../models/ResultIdAccountingResponse'; -import { TaxSearchResponse } from '../models/TaxSearchResponse'; -import { TermsResponse } from '../models/TermsResponse'; - -/** - * no description - */ -export class CallbacksApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created customer. - */ - public async createCustomer(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "createCustomer", "requestId"); - } - - - // verify required parameter 'resultIdAccountingResponse' is not null or undefined - if (resultIdAccountingResponse === null || resultIdAccountingResponse === undefined) { - throw new RequiredError("CallbacksApi", "createCustomer", "resultIdAccountingResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/customer-create/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(resultIdAccountingResponse, "ResultIdAccountingResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param requestId The ID of the request that this response is for - * @param exchangeRateResponse The result of the exchange rate request. - */ - public async createExchangeRate(requestId: string, exchangeRateResponse: ExchangeRateResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "createExchangeRate", "requestId"); - } - - - // verify required parameter 'exchangeRateResponse' is not null or undefined - if (exchangeRateResponse === null || exchangeRateResponse === undefined) { - throw new RequiredError("CallbacksApi", "createExchangeRate", "exchangeRateResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/exchange-rate/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(exchangeRateResponse, "ExchangeRateResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created invoice. - */ - public async createInvoice(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "createInvoice", "requestId"); - } - - - // verify required parameter 'resultIdAccountingResponse' is not null or undefined - if (resultIdAccountingResponse === null || resultIdAccountingResponse === undefined) { - throw new RequiredError("CallbacksApi", "createInvoice", "resultIdAccountingResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/invoice-create/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(resultIdAccountingResponse, "ResultIdAccountingResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param requestId The ID of the request that this response is for - * @param termsResponse The result of the terms search - */ - public async createTerm(requestId: string, termsResponse: TermsResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "createTerm", "requestId"); - } - - - // verify required parameter 'termsResponse' is not null or undefined - if (termsResponse === null || termsResponse === undefined) { - throw new RequiredError("CallbacksApi", "createTerm", "termsResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/terms/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(termsResponse, "TermsResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param requestId The ID of the request that this response is for - * @param customerSearchResponseExternal The result of the customer search request. - */ - public async doCustomerSearch(requestId: string, customerSearchResponseExternal: CustomerSearchResponseExternal, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "doCustomerSearch", "requestId"); - } - - - // verify required parameter 'customerSearchResponseExternal' is not null or undefined - if (customerSearchResponseExternal === null || customerSearchResponseExternal === undefined) { - throw new RequiredError("CallbacksApi", "doCustomerSearch", "customerSearchResponseExternal"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/customer-search/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(customerSearchResponseExternal, "CustomerSearchResponseExternal", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param requestId The ID of the request that this response is for - * @param invoiceSearchResponse The result of the invoice search request. - */ - public async doInvoiceSearch(requestId: string, invoiceSearchResponse: InvoiceSearchResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "doInvoiceSearch", "requestId"); - } - - - // verify required parameter 'invoiceSearchResponse' is not null or undefined - if (invoiceSearchResponse === null || invoiceSearchResponse === undefined) { - throw new RequiredError("CallbacksApi", "doInvoiceSearch", "invoiceSearchResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/invoice-search/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(invoiceSearchResponse, "InvoiceSearchResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param requestId The ID of the request that this response is for - * @param productSearchResponse The result of the product search request. - */ - public async doProductSearch(requestId: string, productSearchResponse: ProductSearchResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "doProductSearch", "requestId"); - } - - - // verify required parameter 'productSearchResponse' is not null or undefined - if (productSearchResponse === null || productSearchResponse === undefined) { - throw new RequiredError("CallbacksApi", "doProductSearch", "productSearchResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/product-search/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(productSearchResponse, "ProductSearchResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param requestId The ID of the request that this response is for - * @param taxSearchResponse The result of the taxes search request. - */ - public async doTaxSearch(requestId: string, taxSearchResponse: TaxSearchResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "doTaxSearch", "requestId"); - } - - - // verify required parameter 'taxSearchResponse' is not null or undefined - if (taxSearchResponse === null || taxSearchResponse === undefined) { - throw new RequiredError("CallbacksApi", "doTaxSearch", "taxSearchResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/tax-search/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(taxSearchResponse, "TaxSearchResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param requestId The ID of the request that this response is for - * @param invoicesResponseExternal The result of the invoice request. - */ - public async getById(requestId: string, invoicesResponseExternal: InvoicesResponseExternal, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "getById", "requestId"); - } - - - // verify required parameter 'invoicesResponseExternal' is not null or undefined - if (invoicesResponseExternal === null || invoicesResponseExternal === undefined) { - throw new RequiredError("CallbacksApi", "getById", "invoicesResponseExternal"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/invoices/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(invoicesResponseExternal, "InvoicesResponseExternal", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param requestId The ID of the request that this response is for - * @param invoicePdfResponse The bytes of the invoice PDF. - */ - public async invoicePdf(requestId: string, invoicePdfResponse: InvoicePdfResponse, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'requestId' is not null or undefined - if (requestId === null || requestId === undefined) { - throw new RequiredError("CallbacksApi", "invoicePdf", "requestId"); - } - - - // verify required parameter 'invoicePdfResponse' is not null or undefined - if (invoicePdfResponse === null || invoicePdfResponse === undefined) { - throw new RequiredError("CallbacksApi", "invoicePdf", "invoicePdfResponse"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/callback/invoice-pdf/{requestId}' - .replace('{' + 'requestId' + '}', encodeURIComponent(String(requestId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(invoicePdfResponse, "InvoicePdfResponse", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class CallbacksApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createCustomer - * @throws ApiException if the response code was not in [200, 299] - */ - public async createCustomerWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createExchangeRate - * @throws ApiException if the response code was not in [200, 299] - */ - public async createExchangeRateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createInvoice - * @throws ApiException if the response code was not in [200, 299] - */ - public async createInvoiceWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createTerm - * @throws ApiException if the response code was not in [200, 299] - */ - public async createTermWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doCustomerSearch - * @throws ApiException if the response code was not in [200, 299] - */ - public async doCustomerSearchWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doInvoiceSearch - * @throws ApiException if the response code was not in [200, 299] - */ - public async doInvoiceSearchWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doProductSearch - * @throws ApiException if the response code was not in [200, 299] - */ - public async doProductSearchWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doTaxSearch - * @throws ApiException if the response code was not in [200, 299] - */ - public async doTaxSearchWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getById - * @throws ApiException if the response code was not in [200, 299] - */ - public async getByIdWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to invoicePdf - * @throws ApiException if the response code was not in [200, 299] - */ - public async invoicePdfWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/extensions/accounting/apis/InvoiceApi.ts b/codegen/crm/extensions/accounting/apis/InvoiceApi.ts deleted file mode 100644 index fe9c481d0..000000000 --- a/codegen/crm/extensions/accounting/apis/InvoiceApi.ts +++ /dev/null @@ -1,314 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { InvoiceCreatePaymentRequest } from '../models/InvoiceCreatePaymentRequest'; -import { InvoiceReadResponse } from '../models/InvoiceReadResponse'; -import { InvoiceUpdateRequest } from '../models/InvoiceUpdateRequest'; -import { InvoiceUpdateResponse } from '../models/InvoiceUpdateResponse'; - -/** - * no description - */ -export class InvoiceApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param invoiceCreatePaymentRequest The payment information - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public async createPayment(invoiceId: string, invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest, accountId?: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'invoiceId' is not null or undefined - if (invoiceId === null || invoiceId === undefined) { - throw new RequiredError("InvoiceApi", "createPayment", "invoiceId"); - } - - - // verify required parameter 'invoiceCreatePaymentRequest' is not null or undefined - if (invoiceCreatePaymentRequest === null || invoiceCreatePaymentRequest === undefined) { - throw new RequiredError("InvoiceApi", "createPayment", "invoiceCreatePaymentRequest"); - } - - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/invoice/{invoiceId}/payment' - .replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (accountId !== undefined) { - requestContext.setQueryParam("accountId", ObjectSerializer.serialize(accountId, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(invoiceCreatePaymentRequest, "InvoiceCreatePaymentRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public async getById(invoiceId: string, accountId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'invoiceId' is not null or undefined - if (invoiceId === null || invoiceId === undefined) { - throw new RequiredError("InvoiceApi", "getById", "invoiceId"); - } - - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new RequiredError("InvoiceApi", "getById", "accountId"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/invoice/{invoiceId}' - .replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (accountId !== undefined) { - requestContext.setQueryParam("accountId", ObjectSerializer.serialize(accountId, "string", "")); - } - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @param invoiceUpdateRequest The invoice data to update - */ - public async update(invoiceId: string, accountId: string, invoiceUpdateRequest: InvoiceUpdateRequest, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'invoiceId' is not null or undefined - if (invoiceId === null || invoiceId === undefined) { - throw new RequiredError("InvoiceApi", "update", "invoiceId"); - } - - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new RequiredError("InvoiceApi", "update", "accountId"); - } - - - // verify required parameter 'invoiceUpdateRequest' is not null or undefined - if (invoiceUpdateRequest === null || invoiceUpdateRequest === undefined) { - throw new RequiredError("InvoiceApi", "update", "invoiceUpdateRequest"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/invoice/{invoiceId}' - .replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (accountId !== undefined) { - requestContext.setQueryParam("accountId", ObjectSerializer.serialize(accountId, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(invoiceUpdateRequest, "InvoiceUpdateRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class InvoiceApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createPayment - * @throws ApiException if the response code was not in [200, 299] - */ - public async createPaymentWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: InvoiceUpdateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceUpdateResponse", "" - ) as InvoiceUpdateResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: InvoiceUpdateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceUpdateResponse", "" - ) as InvoiceUpdateResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getById - * @throws ApiException if the response code was not in [200, 299] - */ - public async getByIdWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: InvoiceReadResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceReadResponse", "" - ) as InvoiceReadResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: InvoiceReadResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceReadResponse", "" - ) as InvoiceReadResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: InvoiceUpdateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceUpdateResponse", "" - ) as InvoiceUpdateResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: InvoiceUpdateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "InvoiceUpdateResponse", "" - ) as InvoiceUpdateResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/extensions/accounting/apis/SettingsApi.ts b/codegen/crm/extensions/accounting/apis/SettingsApi.ts deleted file mode 100644 index 78717c2ac..000000000 --- a/codegen/crm/extensions/accounting/apis/SettingsApi.ts +++ /dev/null @@ -1,172 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { AccountingAppSettings } from '../models/AccountingAppSettings'; - -/** - * no description - */ -export class SettingsApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - public async getById(appId: number, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'appId' is not null or undefined - if (appId === null || appId === undefined) { - throw new RequiredError("SettingsApi", "getById", "appId"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/settings/{appId}' - .replace('{' + 'appId' + '}', encodeURIComponent(String(appId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param accountingAppSettings - */ - public async replace(appId: number, accountingAppSettings: AccountingAppSettings, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'appId' is not null or undefined - if (appId === null || appId === undefined) { - throw new RequiredError("SettingsApi", "replace", "appId"); - } - - - // verify required parameter 'accountingAppSettings' is not null or undefined - if (accountingAppSettings === null || accountingAppSettings === undefined) { - throw new RequiredError("SettingsApi", "replace", "accountingAppSettings"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/settings/{appId}' - .replace('{' + 'appId' + '}', encodeURIComponent(String(appId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(accountingAppSettings, "AccountingAppSettings", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class SettingsApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getById - * @throws ApiException if the response code was not in [200, 299] - */ - public async getByIdWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: AccountingAppSettings = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AccountingAppSettings", "" - ) as AccountingAppSettings; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: AccountingAppSettings = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AccountingAppSettings", "" - ) as AccountingAppSettings; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to replace - * @throws ApiException if the response code was not in [200, 299] - */ - public async replaceWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/extensions/accounting/apis/SyncApi.ts b/codegen/crm/extensions/accounting/apis/SyncApi.ts deleted file mode 100644 index 9fd8482fb..000000000 --- a/codegen/crm/extensions/accounting/apis/SyncApi.ts +++ /dev/null @@ -1,208 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { ActionResponse } from '../models/ActionResponse'; -import { SyncContactsRequest } from '../models/SyncContactsRequest'; -import { SyncProductsRequest } from '../models/SyncProductsRequest'; - -/** - * no description - */ -export class SyncApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncContactsRequest - */ - public async createContact(appId: number, syncContactsRequest: SyncContactsRequest, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'appId' is not null or undefined - if (appId === null || appId === undefined) { - throw new RequiredError("SyncApi", "createContact", "appId"); - } - - - // verify required parameter 'syncContactsRequest' is not null or undefined - if (syncContactsRequest === null || syncContactsRequest === undefined) { - throw new RequiredError("SyncApi", "createContact", "syncContactsRequest"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/sync/{appId}/contacts' - .replace('{' + 'appId' + '}', encodeURIComponent(String(appId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(syncContactsRequest, "SyncContactsRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncProductsRequest - */ - public async createProduct(appId: number, syncProductsRequest: SyncProductsRequest, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'appId' is not null or undefined - if (appId === null || appId === undefined) { - throw new RequiredError("SyncApi", "createProduct", "appId"); - } - - - // verify required parameter 'syncProductsRequest' is not null or undefined - if (syncProductsRequest === null || syncProductsRequest === undefined) { - throw new RequiredError("SyncApi", "createProduct", "syncProductsRequest"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/sync/{appId}/products' - .replace('{' + 'appId' + '}', encodeURIComponent(String(appId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(syncProductsRequest, "SyncProductsRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class SyncApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createContact - * @throws ApiException if the response code was not in [200, 299] - */ - public async createContactWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createProduct - * @throws ApiException if the response code was not in [200, 299] - */ - public async createProductWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ActionResponse", "" - ) as ActionResponse; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/extensions/accounting/apis/UserAccountsApi.ts b/codegen/crm/extensions/accounting/apis/UserAccountsApi.ts deleted file mode 100644 index 28bc0d7b0..000000000 --- a/codegen/crm/extensions/accounting/apis/UserAccountsApi.ts +++ /dev/null @@ -1,172 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { CreateUserAccountRequestExternal } from '../models/CreateUserAccountRequestExternal'; - -/** - * no description - */ -export class UserAccountsApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param accountId The ID of the user account to delete. - */ - public async archive(accountId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new RequiredError("UserAccountsApi", "archive", "accountId"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/user-accounts/{accountId}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param createUserAccountRequestExternal The external accounting system user account information. - */ - public async replace(createUserAccountRequestExternal: CreateUserAccountRequestExternal, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'createUserAccountRequestExternal' is not null or undefined - if (createUserAccountRequestExternal === null || createUserAccountRequestExternal === undefined) { - throw new RequiredError("UserAccountsApi", "replace", "createUserAccountRequestExternal"); - } - - - // Path Params - const localVarPath = '/crm/v3/extensions/accounting/user-accounts'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(createUserAccountRequestExternal, "CreateUserAccountRequestExternal", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class UserAccountsApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to replace - * @throws ApiException if the response code was not in [200, 299] - */ - public async replaceWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/extensions/accounting/apis/baseapi.ts b/codegen/crm/extensions/accounting/apis/baseapi.ts deleted file mode 100644 index ce1e2dbc4..000000000 --- a/codegen/crm/extensions/accounting/apis/baseapi.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Configuration } from '../configuration' - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPIRequestFactory { - - constructor(protected configuration: Configuration) { - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; - constructor(public api: string, public method: string, public field: string) { - super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); - } -} diff --git a/codegen/crm/extensions/accounting/apis/exception.ts b/codegen/crm/extensions/accounting/apis/exception.ts deleted file mode 100644 index 9365d33a8..000000000 --- a/codegen/crm/extensions/accounting/apis/exception.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code - * and the returned body object. - * - * Example - * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] - * => ApiException(404, someErrorMessageObject) - * - */ -export class ApiException extends Error { - public constructor(public code: number, message: string, public body: T, public headers: { [key: string]: string; }) { - super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + - JSON.stringify(headers)) - } -} diff --git a/codegen/crm/extensions/accounting/auth/auth.ts b/codegen/crm/extensions/accounting/auth/auth.ts deleted file mode 100644 index 2bd763b1a..000000000 --- a/codegen/crm/extensions/accounting/auth/auth.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { RequestContext } from "../http/http"; - -/** - * Interface authentication schemes. - */ -export interface SecurityAuthentication { - /* - * @return returns the name of the security authentication as specified in OAI - */ - getName(): string; - - /** - * Applies the authentication scheme to the request context - * - * @params context the request context which should use this authentication scheme - */ - applySecurityAuthentication(context: RequestContext): void | Promise; -} - -export interface TokenProvider { - getToken(): Promise | string; -} - -/** - * Applies oauth2 authentication to the request context. - */ -export class Oauth2Authentication implements SecurityAuthentication { - /** - * Configures OAuth2 with the necessary properties - * - * @param accessToken: The access token to be used for every request - */ - public constructor(private accessToken: string) {} - - public getName(): string { - return "oauth2"; - } - - public applySecurityAuthentication(context: RequestContext) { - context.setHeaderParam("Authorization", "Bearer " + this.accessToken); - } -} - - -export type AuthMethods = { - "default"?: SecurityAuthentication, - "oauth2"?: SecurityAuthentication -} - -export type ApiKeyConfiguration = string; -export type HttpBasicConfiguration = { "username": string, "password": string }; -export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; -export type OAuth2Configuration = { accessToken: string }; - -export type AuthMethodsConfiguration = { - "default"?: SecurityAuthentication, - "oauth2"?: OAuth2Configuration -} - -/** - * Creates the authentication methods from a swagger description. - * - */ -export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods { - let authMethods: AuthMethods = {} - - if (!config) { - return authMethods; - } - authMethods["default"] = config["default"] - - if (config["oauth2"]) { - authMethods["oauth2"] = new Oauth2Authentication( - config["oauth2"]["accessToken"] - ); - } - - return authMethods; -} \ No newline at end of file diff --git a/codegen/crm/extensions/accounting/configuration.ts b/codegen/crm/extensions/accounting/configuration.ts deleted file mode 100644 index 7acb56e66..000000000 --- a/codegen/crm/extensions/accounting/configuration.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { HttpLibrary } from "./http/http"; -import { Middleware, PromiseMiddleware, PromiseMiddlewareWrapper } from "./middleware"; -import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch"; -import { BaseServerConfiguration, server1 } from "./servers"; -import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth"; - -export interface Configuration { - readonly baseServer: BaseServerConfiguration; - readonly httpApi: HttpLibrary; - readonly middleware: Middleware[]; - readonly authMethods: AuthMethods; -} - - -/** - * Interface with which a configuration object can be configured. - */ -export interface ConfigurationParameters { - /** - * Default server to use - a list of available servers (according to the - * OpenAPI yaml definition) is included in the `servers` const in `./servers`. You can also - * create your own server with the `ServerConfiguration` class from the same - * file. - */ - baseServer?: BaseServerConfiguration; - /** - * HTTP library to use e.g. IsomorphicFetch. This can usually be skipped as - * all generators come with a default library. - * If available, additional libraries can be imported from `./http/*` - */ - httpApi?: HttpLibrary; - - /** - * The middlewares which will be applied to requests and responses. You can - * add any number of middleware components to modify requests before they - * are sent or before they are deserialized by implementing the `Middleware` - * interface defined in `./middleware` - */ - middleware?: Middleware[]; - /** - * Configures middleware functions that return promises instead of - * Observables (which are used by `middleware`). Otherwise allows for the - * same functionality as `middleware`, i.e., modifying requests before they - * are sent and before they are deserialized. - */ - promiseMiddleware?: PromiseMiddleware[]; - /** - * Configuration for the available authentication methods (e.g., api keys) - * according to the OpenAPI yaml definition. For the definition, please refer to - * `./auth/auth` - */ - authMethods?: AuthMethodsConfiguration -} - -/** - * Provide your `ConfigurationParameters` to this function to get a `Configuration` - * object that can be used to configure your APIs (in the constructor or - * for each request individually). - * - * If a property is not included in conf, a default is used: - * - baseServer: server1 - * - httpApi: IsomorphicFetchHttpLibrary - * - middleware: [] - * - promiseMiddleware: [] - * - authMethods: {} - * - * @param conf partial configuration - */ -export function createConfiguration(conf: ConfigurationParameters = {}): Configuration { - const configuration: Configuration = { - baseServer: conf.baseServer !== undefined ? conf.baseServer : server1, - httpApi: conf.httpApi || new DefaultHttpLibrary(), - middleware: conf.middleware || [], - authMethods: configureAuthMethods(conf.authMethods) - }; - if (conf.promiseMiddleware) { - conf.promiseMiddleware.forEach( - m => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) - ); - } - return configuration; -} \ No newline at end of file diff --git a/codegen/crm/extensions/accounting/http/http.ts b/codegen/crm/extensions/accounting/http/http.ts deleted file mode 100644 index 3a99a14d8..000000000 --- a/codegen/crm/extensions/accounting/http/http.ts +++ /dev/null @@ -1,247 +0,0 @@ -// TODO: evaluate if we can easily get rid of this library -import FormData from "form-data"; -import { URL, URLSearchParams } from 'url'; -import * as http from 'http'; -import * as https from 'https'; -import { Observable, from } from '../rxjsStub'; - -export * from './isomorphic-fetch'; - -/** - * Represents an HTTP method. - */ -export enum HttpMethod { - GET = "GET", - HEAD = "HEAD", - POST = "POST", - PUT = "PUT", - DELETE = "DELETE", - CONNECT = "CONNECT", - OPTIONS = "OPTIONS", - TRACE = "TRACE", - PATCH = "PATCH" -} - -/** - * Represents an HTTP file which will be transferred from or to a server. - */ -export type HttpFile = { - data: Buffer, - name: string -}; - -export class HttpException extends Error { - public constructor(msg: string) { - super(msg); - } -} - -/** - * Represents the body of an outgoing HTTP request. - */ -export type RequestBody = undefined | string | FormData | URLSearchParams; - -function ensureAbsoluteUrl(url: string) { - if (url.startsWith("http://") || url.startsWith("https://")) { - return url; - } - throw new Error("You need to define an absolute base url for the server."); -} - -/** - * Represents an HTTP request context - */ -export class RequestContext { - private headers: { [key: string]: string } = {}; - private body: RequestBody = undefined; - private url: URL; - private agent: http.Agent | https.Agent | undefined = undefined; - - /** - * Creates the request context using a http method and request resource url - * - * @param url url of the requested resource - * @param httpMethod http method - */ - public constructor(url: string, private httpMethod: HttpMethod) { - this.url = new URL(ensureAbsoluteUrl(url)); - } - - /* - * Returns the url set in the constructor including the query string - * - */ - public getUrl(): string { - return this.url.toString().endsWith("/") ? - this.url.toString().slice(0, -1) - : this.url.toString(); - } - - /** - * Replaces the url set in the constructor with this url. - * - */ - public setUrl(url: string) { - this.url = new URL(ensureAbsoluteUrl(url)); - } - - /** - * Sets the body of the http request either as a string or FormData - * - * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE - * request is discouraged. - * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 - * - * @param body the body of the request - */ - public setBody(body: RequestBody) { - this.body = body; - } - - public getHttpMethod(): HttpMethod { - return this.httpMethod; - } - - public getHeaders(): { [key: string]: string } { - return this.headers; - } - - public getBody(): RequestBody { - return this.body; - } - - public setQueryParam(name: string, value: string) { - this.url.searchParams.set(name, value); - } - - /** - * Sets a cookie with the name and value. NO check for duplicate cookies is performed - * - */ - public addCookie(name: string, value: string): void { - if (!this.headers["Cookie"]) { - this.headers["Cookie"] = ""; - } - this.headers["Cookie"] += name + "=" + value + "; "; - } - - public setHeaderParam(key: string, value: string): void { - this.headers[key] = value; - } - - public setAgent(agent: http.Agent | https.Agent) { - this.agent = agent; - } - - public getAgent(): http.Agent | https.Agent | undefined { - return this.agent; - } -} - -export interface ResponseBody { - text(): Promise; - binary(): Promise; -} - -/** - * Helper class to generate a `ResponseBody` from binary data - */ -export class SelfDecodingBody implements ResponseBody { - constructor(private dataSource: Promise) {} - - binary(): Promise { - return this.dataSource; - } - - async text(): Promise { - const data: Buffer = await this.dataSource; - return data.toString(); - } -} - -export class ResponseContext { - public constructor( - public httpStatusCode: number, - public headers: { [key: string]: string }, - public body: ResponseBody - ) {} - - /** - * Parse header value in the form `value; param1="value1"` - * - * E.g. for Content-Type or Content-Disposition - * Parameter names are converted to lower case - * The first parameter is returned with the key `""` - */ - public getParsedHeader(headerName: string): { [parameter: string]: string } { - const result: { [parameter: string]: string } = {}; - if (!this.headers[headerName]) { - return result; - } - - const parameters = this.headers[headerName].split(";"); - for (const parameter of parameters) { - let [key, value] = parameter.split("=", 2); - key = key.toLowerCase().trim(); - if (value === undefined) { - result[""] = key; - } else { - value = value.trim(); - if (value.startsWith('"') && value.endsWith('"')) { - value = value.substring(1, value.length - 1); - } - result[key] = value; - } - } - return result; - } - - public async getBodyAsFile(): Promise { - const data = await this.body.binary(); - const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; - return { data, name: fileName }; - } - - /** - * Use a heuristic to get a body of unknown data structure. - * Return as string if possible, otherwise as binary. - */ - public getBodyAsAny(): Promise { - try { - return this.body.text(); - } catch {} - - try { - return this.body.binary(); - } catch {} - - return Promise.resolve(undefined); - } -} - -export interface HttpLibrary { - send(request: RequestContext): Observable; -} - -export interface PromiseHttpLibrary { - send(request: RequestContext): Promise; -} - -export function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary { - return { - send(request: RequestContext): Observable { - return from(promiseHttpLibrary.send(request)); - } - } -} - -export class HttpInfo extends ResponseContext { - public constructor( - public httpStatusCode: number, - public headers: { [key: string]: string }, - public body: ResponseBody, - public data: T, - ) { - super(httpStatusCode, headers, body); - } -} diff --git a/codegen/crm/extensions/accounting/http/isomorphic-fetch.ts b/codegen/crm/extensions/accounting/http/isomorphic-fetch.ts deleted file mode 100644 index 26d267cfc..000000000 --- a/codegen/crm/extensions/accounting/http/isomorphic-fetch.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {HttpLibrary, RequestContext, ResponseContext} from './http'; -import { from, Observable } from '../rxjsStub'; -import fetch from "node-fetch"; - -export class IsomorphicFetchHttpLibrary implements HttpLibrary { - - public send(request: RequestContext): Observable { - let method = request.getHttpMethod().toString(); - let body = request.getBody(); - - const resultPromise = fetch(request.getUrl(), { - method: method, - body: body as any, - headers: request.getHeaders(), - agent: request.getAgent(), - }).then((resp: any) => { - const headers: { [name: string]: string } = {}; - resp.headers.forEach((value: string, name: string) => { - headers[name] = value; - }); - - const body = { - text: () => resp.text(), - binary: () => resp.buffer() - }; - return new ResponseContext(resp.status, headers, body); - }); - - return from>(resultPromise); - - } -} diff --git a/codegen/crm/extensions/accounting/index.ts b/codegen/crm/extensions/accounting/index.ts deleted file mode 100644 index 5c42074f9..000000000 --- a/codegen/crm/extensions/accounting/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from "./http/http"; -export * from "./auth/auth"; -export * from "./models/all"; -export { createConfiguration } from "./configuration" -export { Configuration } from "./configuration" -export * from "./apis/exception"; -export * from "./servers"; -export { RequiredError } from "./apis/baseapi"; - -export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseCallbacksApi as CallbacksApi, PromiseInvoiceApi as InvoiceApi, PromiseSettingsApi as SettingsApi, PromiseSyncApi as SyncApi, PromiseUserAccountsApi as UserAccountsApi } from './types/PromiseAPI'; - diff --git a/codegen/crm/extensions/accounting/middleware.ts b/codegen/crm/extensions/accounting/middleware.ts deleted file mode 100644 index 524f93f01..000000000 --- a/codegen/crm/extensions/accounting/middleware.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {RequestContext, ResponseContext} from './http/http'; -import { Observable, from } from './rxjsStub'; - -/** - * Defines the contract for a middleware intercepting requests before - * they are sent (but after the RequestContext was created) - * and before the ResponseContext is unwrapped. - * - */ -export interface Middleware { - /** - * Modifies the request before the request is sent. - * - * @param context RequestContext of a request which is about to be sent to the server - * @returns an observable of the updated request context - * - */ - pre(context: RequestContext): Observable; - /** - * Modifies the returned response before it is deserialized. - * - * @param context ResponseContext of a sent request - * @returns an observable of the modified response context - */ - post(context: ResponseContext): Observable; -} - -export class PromiseMiddlewareWrapper implements Middleware { - - public constructor(private middleware: PromiseMiddleware) { - - } - - pre(context: RequestContext): Observable { - return from(this.middleware.pre(context)); - } - - post(context: ResponseContext): Observable { - return from(this.middleware.post(context)); - } - -} - -/** - * Defines the contract for a middleware intercepting requests before - * they are sent (but after the RequestContext was created) - * and before the ResponseContext is unwrapped. - * - */ -export interface PromiseMiddleware { - /** - * Modifies the request before the request is sent. - * - * @param context RequestContext of a request which is about to be sent to the server - * @returns an observable of the updated request context - * - */ - pre(context: RequestContext): Promise; - /** - * Modifies the returned response before it is deserialized. - * - * @param context ResponseContext of a sent request - * @returns an observable of the modified response context - */ - post(context: ResponseContext): Promise; -} diff --git a/codegen/crm/extensions/accounting/models/AccountingAppSettings.ts b/codegen/crm/extensions/accounting/models/AccountingAppSettings.ts deleted file mode 100644 index e57d4cc7d..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingAppSettings.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountingAppUrls } from '../models/AccountingAppUrls'; -import { AccountingFeatures } from '../models/AccountingFeatures'; - -/** -* The URL Settings, which defines the URL endpoints that HubSpot will send requests to an external accounting application for certain actions. -*/ -export class AccountingAppSettings { - /** - * The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - 'appId': number; - 'urls': AccountingAppUrls; - 'features'?: AccountingFeatures; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "appId", - "baseName": "appId", - "type": "number", - "format": "int32" - }, - { - "name": "urls", - "baseName": "urls", - "type": "AccountingAppUrls", - "format": "" - }, - { - "name": "features", - "baseName": "features", - "type": "AccountingFeatures", - "format": "" - } ]; - - static getAttributeTypeMap() { - return AccountingAppSettings.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/AccountingAppUrls.ts b/codegen/crm/extensions/accounting/models/AccountingAppUrls.ts deleted file mode 100644 index 799b2bb61..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingAppUrls.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* The URL endpoints that HubSpot will send requests to an external accounting system for certain actions. -*/ -export class AccountingAppUrls { - /** - * A URL that specifies the endpoint where invoices can be retrieved. - */ - 'getInvoiceUrl': string; - /** - * A URL that specifies the endpoint where a customer search can be performed. - */ - 'searchCustomerUrl': string; - /** - * A URL that specifies the endpoint where an invoice PDF can be retrieved. - */ - 'getInvoicePdfUrl': string; - /** - * A template URL that indicates the endpoint where a customer can be fetched by ID. Note that ${CUSTOMER_ID} in this URL will be replaced by the actual customer ID. For example: https://myapp.com/api/customers/${CUSTOMER_ID} - */ - 'customerUrlTemplate': string; - /** - * A template URL that indicates the endpoint where a product can be fetched by ID. Note that ${PRODUCT_ID} in this URL will be replaced by the actual product ID. For example: https://myapp.com/api/products/${PRODUCT_ID} - */ - 'productUrlTemplate': string; - /** - * A template URL that indicates the endpoint where an invoice can be fetched by ID. Note that ${INVOICE_ID} in this URL will be replaced by the actual invoice ID. For example: https://myapp.com/api/invoices/${INVOICE_ID} - */ - 'invoiceUrlTemplate': string; - /** - * A URL that specifies the endpoint where an invoices can be created. - */ - 'createInvoiceUrl'?: string; - /** - * A URL that specifies the endpoint where an invoice search can be performed. - */ - 'searchInvoiceUrl'?: string; - /** - * A URL that specifies the endpoint where a product search can be performed. - */ - 'searchProductUrl'?: string; - /** - * A URL that specifies the endpoint where payment terms can be retrieved. - */ - 'getTermsUrl'?: string; - /** - * A URL that specifies the endpoint where a new customer can be created. - */ - 'createCustomerUrl'?: string; - /** - * A URL that specifies the endpoint where a tax search can be performed. - */ - 'searchTaxUrl'?: string; - /** - * A URL that specifies the endpoint where exchange rates can be queried. - */ - 'exchangeRateUrl'?: string; - 'searchUrl'?: string; - 'searchCountUrl'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "getInvoiceUrl", - "baseName": "getInvoiceUrl", - "type": "string", - "format": "" - }, - { - "name": "searchCustomerUrl", - "baseName": "searchCustomerUrl", - "type": "string", - "format": "" - }, - { - "name": "getInvoicePdfUrl", - "baseName": "getInvoicePdfUrl", - "type": "string", - "format": "" - }, - { - "name": "customerUrlTemplate", - "baseName": "customerUrlTemplate", - "type": "string", - "format": "" - }, - { - "name": "productUrlTemplate", - "baseName": "productUrlTemplate", - "type": "string", - "format": "" - }, - { - "name": "invoiceUrlTemplate", - "baseName": "invoiceUrlTemplate", - "type": "string", - "format": "" - }, - { - "name": "createInvoiceUrl", - "baseName": "createInvoiceUrl", - "type": "string", - "format": "" - }, - { - "name": "searchInvoiceUrl", - "baseName": "searchInvoiceUrl", - "type": "string", - "format": "" - }, - { - "name": "searchProductUrl", - "baseName": "searchProductUrl", - "type": "string", - "format": "" - }, - { - "name": "getTermsUrl", - "baseName": "getTermsUrl", - "type": "string", - "format": "" - }, - { - "name": "createCustomerUrl", - "baseName": "createCustomerUrl", - "type": "string", - "format": "" - }, - { - "name": "searchTaxUrl", - "baseName": "searchTaxUrl", - "type": "string", - "format": "" - }, - { - "name": "exchangeRateUrl", - "baseName": "exchangeRateUrl", - "type": "string", - "format": "" - }, - { - "name": "searchUrl", - "baseName": "searchUrl", - "type": "string", - "format": "" - }, - { - "name": "searchCountUrl", - "baseName": "searchCountUrl", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return AccountingAppUrls.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/AccountingExtensionCustomer.ts b/codegen/crm/extensions/accounting/models/AccountingExtensionCustomer.ts deleted file mode 100644 index 1fad1459d..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingExtensionCustomer.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { Address } from '../models/Address'; - -/** -* Representation of a customer in the external accounting system. -*/ -export class AccountingExtensionCustomer { - /** - * The customer\'s email address - */ - 'emailAddress'?: string; - /** - * The customer\'s full name - */ - 'name': string; - /** - * The ID of the customer in the external accounting system. - */ - 'id': string; - 'billingAddress'?: Address; - /** - * The ISO 4217 currency code that represents the currency the customer should be billed in. - */ - 'currencyCode'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "emailAddress", - "baseName": "emailAddress", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return AccountingExtensionCustomer.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/AccountingExtensionInvoice.ts b/codegen/crm/extensions/accounting/models/AccountingExtensionInvoice.ts deleted file mode 100644 index 72ce8873e..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingExtensionInvoice.ts +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Representation of an invoice in the external accounting system. -*/ -export class AccountingExtensionInvoice { - /** - * The total amount due. - */ - 'amountDue': number; - /** - * The remaining outstanding balance due. - */ - 'balance'?: number; - /** - * The due date for payment of the invoice, in ISO-8601 date format (yyyy-MM-dd) - */ - 'dueDate': string; - /** - * The invoice number - */ - 'invoiceNumber'?: string; - /** - * The ID of the customer that this invoice is for. - */ - 'customerId'?: string; - /** - * The ISO 4217 currency code that represents the currency of this invoice. - */ - 'currency': string; - /** - * A link to the invoice in the external accounting system. - */ - 'invoiceLink': string; - /** - * The name of the customer that this invoice is for. - */ - 'customerName': string; - /** - * The currency status of the invoice. - */ - 'status': AccountingExtensionInvoiceStatusEnum; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "amountDue", - "baseName": "amountDue", - "type": "number", - "format": "" - }, - { - "name": "balance", - "baseName": "balance", - "type": "number", - "format": "" - }, - { - "name": "dueDate", - "baseName": "dueDate", - "type": "string", - "format": "date" - }, - { - "name": "invoiceNumber", - "baseName": "invoiceNumber", - "type": "string", - "format": "" - }, - { - "name": "customerId", - "baseName": "customerId", - "type": "string", - "format": "" - }, - { - "name": "currency", - "baseName": "currency", - "type": "string", - "format": "" - }, - { - "name": "invoiceLink", - "baseName": "invoiceLink", - "type": "string", - "format": "" - }, - { - "name": "customerName", - "baseName": "customerName", - "type": "string", - "format": "" - }, - { - "name": "status", - "baseName": "status", - "type": "AccountingExtensionInvoiceStatusEnum", - "format": "" - } ]; - - static getAttributeTypeMap() { - return AccountingExtensionInvoice.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum AccountingExtensionInvoiceStatusEnum { - Created = 'CREATED', - Sent = 'SENT', - Paid = 'PAID', - Closed = 'CLOSED', - Overdue = 'OVERDUE', - Voided = 'VOIDED' -} - diff --git a/codegen/crm/extensions/accounting/models/AccountingExtensionTerm.ts b/codegen/crm/extensions/accounting/models/AccountingExtensionTerm.ts deleted file mode 100644 index 939e88a52..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingExtensionTerm.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Representation of payment terms that are defined in the external accounting system. One of \'dueDays\' or \'dueDate\' is required. -*/ -export class AccountingExtensionTerm { - /** - * The due date for payment of the invoice, in ISO-8601 date format (yyyy-MM-dd) - */ - 'dueDate'?: string; - /** - * The display name of the payment terms. - */ - 'name': string; - /** - * The ID of the payment terms in the external accounting system. - */ - 'id': string; - /** - * The number of days that these payment terms represent. - */ - 'dueDays'?: number; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "dueDate", - "baseName": "dueDate", - "type": "string", - "format": "date" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "dueDays", - "baseName": "dueDays", - "type": "number", - "format": "int32" - } ]; - - static getAttributeTypeMap() { - return AccountingExtensionTerm.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/AccountingFeatures.ts b/codegen/crm/extensions/accounting/models/AccountingFeatures.ts deleted file mode 100644 index fc35d216f..000000000 --- a/codegen/crm/extensions/accounting/models/AccountingFeatures.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CreateInvoiceFeature } from '../models/CreateInvoiceFeature'; -import { ImportInvoiceFeature } from '../models/ImportInvoiceFeature'; -import { ObjectSyncFeature } from '../models/ObjectSyncFeature'; - -/** -* Outlines the features that are supported by the external accounting system. -*/ -export class AccountingFeatures { - 'createInvoice': CreateInvoiceFeature; - 'importInvoice': ImportInvoiceFeature; - /** - * Indicates if syncing objects from the external account system into HubSpot is supported for the integration. This is a map, where the key is one of `CONTACT` or `PRODUCT`, to indicate which type of object you do or don\'t support syncing. For example: ``` \"sync\": { \"CONTACT\": { \"toHubSpot\": true }, \"PRODUCT\": { \"toHubSpot\": true } } ``` - */ - 'sync': { [key: string]: ObjectSyncFeature; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "createInvoice", - "baseName": "createInvoice", - "type": "CreateInvoiceFeature", - "format": "" - }, - { - "name": "importInvoice", - "baseName": "importInvoice", - "type": "ImportInvoiceFeature", - "format": "" - }, - { - "name": "sync", - "baseName": "sync", - "type": "{ [key: string]: ObjectSyncFeature; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return AccountingFeatures.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/ActionResponse.ts b/codegen/crm/extensions/accounting/models/ActionResponse.ts deleted file mode 100644 index 0d44060fb..000000000 --- a/codegen/crm/extensions/accounting/models/ActionResponse.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ActionResponse { - 'status': ActionResponseStatusEnum; - 'requestedAt'?: Date; - 'startedAt': Date; - 'completedAt': Date; - 'links'?: { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "status", - "baseName": "status", - "type": "ActionResponseStatusEnum", - "format": "" - }, - { - "name": "requestedAt", - "baseName": "requestedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "startedAt", - "baseName": "startedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "completedAt", - "baseName": "completedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ActionResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum ActionResponseStatusEnum { - Pending = 'PENDING', - Processing = 'PROCESSING', - Canceled = 'CANCELED', - Complete = 'COMPLETE' -} - diff --git a/codegen/crm/extensions/accounting/models/Address.ts b/codegen/crm/extensions/accounting/models/Address.ts deleted file mode 100644 index ec27a2903..000000000 --- a/codegen/crm/extensions/accounting/models/Address.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Represents an address of a customer -*/ -export class Address { - /** - * The country of the address. - */ - 'country'?: string; - /** - * A region of the county of the address. May represent county, state etc. - */ - 'countrySubDivisionCode'?: string; - /** - * The city of the address. - */ - 'city'?: string; - /** - * The postcode/zipcode of the address. - */ - 'postalCode'?: string; - /** - * The first line of the address. - */ - 'lineOne'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "country", - "baseName": "country", - "type": "string", - "format": "" - }, - { - "name": "countrySubDivisionCode", - "baseName": "countrySubDivisionCode", - "type": "string", - "format": "" - }, - { - "name": "city", - "baseName": "city", - "type": "string", - "format": "" - }, - { - "name": "postalCode", - "baseName": "postalCode", - "type": "string", - "format": "" - }, - { - "name": "lineOne", - "baseName": "lineOne", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return Address.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/CreateInvoiceFeature.ts b/codegen/crm/extensions/accounting/models/CreateInvoiceFeature.ts deleted file mode 100644 index 047057f2a..000000000 --- a/codegen/crm/extensions/accounting/models/CreateInvoiceFeature.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CreateInvoiceSubFeatures } from '../models/CreateInvoiceSubFeatures'; - -/** -* Indicates what elements of creating invoices in HubSpot is supported for the integration. -*/ -export class CreateInvoiceFeature { - /** - * Indicates if creating invoices in HubSpot is supported for the integration. - */ - 'enabled': boolean; - 'subFeatures': CreateInvoiceSubFeatures; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "enabled", - "baseName": "enabled", - "type": "boolean", - "format": "" - }, - { - "name": "subFeatures", - "baseName": "subFeatures", - "type": "CreateInvoiceSubFeatures", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CreateInvoiceFeature.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/CreateInvoiceSubFeatures.ts b/codegen/crm/extensions/accounting/models/CreateInvoiceSubFeatures.ts deleted file mode 100644 index 42ebe6b52..000000000 --- a/codegen/crm/extensions/accounting/models/CreateInvoiceSubFeatures.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Lists the individual aspects of creating invoices that are enabled for the integration, as part of the create invoice flow in HubSpot. -*/ -export class CreateInvoiceSubFeatures { - /** - * Indicates if a new customer can be created in the external accounting system. - */ - 'createCustomer': boolean; - /** - * Indicates if taxes can be specified by the HubSpot user for line items. - */ - 'taxes': boolean; - /** - * Indicates if the external accounting system supports fetching exchange rates when create an invoice in HubSpot for a customer billed in a different currency. - */ - 'exchangeRates': boolean; - /** - * Indicates if the external accounting system supports fetching payment terms. - */ - 'terms': boolean; - /** - * Indicates if a visible comment can be added to invoices. - */ - 'invoiceComments': boolean; - /** - * Indicates if invoice-level discounts can be added to invoices. - */ - 'invoiceDiscounts': boolean; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "createCustomer", - "baseName": "createCustomer", - "type": "boolean", - "format": "" - }, - { - "name": "taxes", - "baseName": "taxes", - "type": "boolean", - "format": "" - }, - { - "name": "exchangeRates", - "baseName": "exchangeRates", - "type": "boolean", - "format": "" - }, - { - "name": "terms", - "baseName": "terms", - "type": "boolean", - "format": "" - }, - { - "name": "invoiceComments", - "baseName": "invoiceComments", - "type": "boolean", - "format": "" - }, - { - "name": "invoiceDiscounts", - "baseName": "invoiceDiscounts", - "type": "boolean", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CreateInvoiceSubFeatures.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/CreateUserAccountRequestExternal.ts b/codegen/crm/extensions/accounting/models/CreateUserAccountRequestExternal.ts deleted file mode 100644 index 28be480db..000000000 --- a/codegen/crm/extensions/accounting/models/CreateUserAccountRequestExternal.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Information about the account in your external account system. -*/ -export class CreateUserAccountRequestExternal { - /** - * The id of the account in your system. - */ - 'accountId': string; - /** - * The name of the account in your system. This is normally the name visible to your users. - */ - 'accountName': string; - /** - * The default currency that this account uses. - */ - 'currencyCode': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "accountId", - "baseName": "accountId", - "type": "string", - "format": "" - }, - { - "name": "accountName", - "baseName": "accountName", - "type": "string", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CreateUserAccountRequestExternal.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/CustomerSearchResponseExternal.ts b/codegen/crm/extensions/accounting/models/CustomerSearchResponseExternal.ts deleted file mode 100644 index a8d4926ae..000000000 --- a/codegen/crm/extensions/accounting/models/CustomerSearchResponseExternal.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountingExtensionCustomer } from '../models/AccountingExtensionCustomer'; - -/** -* A response to a search for customers. -*/ -export class CustomerSearchResponseExternal { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result': CustomerSearchResponseExternalResultEnum; - /** - * The list of customers that matched the search criteria. - */ - 'customers': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "CustomerSearchResponseExternalResultEnum", - "format": "" - }, - { - "name": "customers", - "baseName": "customers", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CustomerSearchResponseExternal.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum CustomerSearchResponseExternalResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/ErrorDetail.ts b/codegen/crm/extensions/accounting/models/ErrorDetail.ts deleted file mode 100644 index ba6cd7cd5..000000000 --- a/codegen/crm/extensions/accounting/models/ErrorDetail.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ErrorDetail { - /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * The name of the field or parameter in which the error was found. - */ - '_in'?: string; - /** - * The status code associated with the error detail - */ - 'code'?: string; - /** - * A specific category that contains more specific detail about the error - */ - 'subCategory'?: string; - /** - * Context about the error condition - */ - 'context'?: { [key: string]: Array; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "_in", - "baseName": "in", - "type": "string", - "format": "" - }, - { - "name": "code", - "baseName": "code", - "type": "string", - "format": "" - }, - { - "name": "subCategory", - "baseName": "subCategory", - "type": "string", - "format": "" - }, - { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ErrorDetail.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/ExchangeRateResponse.ts b/codegen/crm/extensions/accounting/models/ExchangeRateResponse.ts deleted file mode 100644 index e4ca685f7..000000000 --- a/codegen/crm/extensions/accounting/models/ExchangeRateResponse.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A response to the request for an exchange rate value. It represents the exchange rate from the source currency to the target currency. -*/ -export class ExchangeRateResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result': ExchangeRateResponseResultEnum; - /** - * The exchange rate between the 2 currencies - */ - 'exchangeRate': number; - /** - * The ISO 4217 currency code that represents the source currency of the exchange rate. - */ - 'sourceCurrencyCode': string; - /** - * The ISO 4217 currency code that represents the target currency of the exchange rate. - */ - 'targetCurrencyCode': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "ExchangeRateResponseResultEnum", - "format": "" - }, - { - "name": "exchangeRate", - "baseName": "exchangeRate", - "type": "number", - "format": "" - }, - { - "name": "sourceCurrencyCode", - "baseName": "sourceCurrencyCode", - "type": "string", - "format": "" - }, - { - "name": "targetCurrencyCode", - "baseName": "targetCurrencyCode", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ExchangeRateResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum ExchangeRateResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/ImportInvoiceFeature.ts b/codegen/crm/extensions/accounting/models/ImportInvoiceFeature.ts deleted file mode 100644 index 8ebc1e0d8..000000000 --- a/codegen/crm/extensions/accounting/models/ImportInvoiceFeature.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Indicates if importing invoices from the external account system into HubSpot is supported for the integration. -*/ -export class ImportInvoiceFeature { - /** - * Indicates if importing invoices from the external account system into HubSpot. - */ - 'enabled': boolean; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "enabled", - "baseName": "enabled", - "type": "boolean", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ImportInvoiceFeature.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/InvoiceCreatePaymentRequest.ts b/codegen/crm/extensions/accounting/models/InvoiceCreatePaymentRequest.ts deleted file mode 100644 index 638e95f0a..000000000 --- a/codegen/crm/extensions/accounting/models/InvoiceCreatePaymentRequest.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class InvoiceCreatePaymentRequest { - /** - * The amount that this payment is for. - */ - 'amountPaid': number; - /** - * The ISO 4217 currency code that represents the currency of the payment. - */ - 'currencyCode': string; - /** - * The datetime that this payment was received. - */ - 'paymentDateTime': Date; - /** - * The id of this payment in the external accounting system. - */ - 'externalPaymentId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "amountPaid", - "baseName": "amountPaid", - "type": "number", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - }, - { - "name": "paymentDateTime", - "baseName": "paymentDateTime", - "type": "Date", - "format": "date-time" - }, - { - "name": "externalPaymentId", - "baseName": "externalPaymentId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoiceCreatePaymentRequest.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/InvoicePdfResponse.ts b/codegen/crm/extensions/accounting/models/InvoicePdfResponse.ts deleted file mode 100644 index 481d62203..000000000 --- a/codegen/crm/extensions/accounting/models/InvoicePdfResponse.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A response that contains the PDF of an invoice -*/ -export class InvoicePdfResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: InvoicePdfResponseResultEnum; - /** - * The bytes of the invoice PDF. - */ - 'invoice': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "InvoicePdfResponseResultEnum", - "format": "" - }, - { - "name": "invoice", - "baseName": "invoice", - "type": "string", - "format": "byte" - } ]; - - static getAttributeTypeMap() { - return InvoicePdfResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum InvoicePdfResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/InvoiceReadResponse.ts b/codegen/crm/extensions/accounting/models/InvoiceReadResponse.ts deleted file mode 100644 index 39e7be9d3..000000000 --- a/codegen/crm/extensions/accounting/models/InvoiceReadResponse.ts +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* The invoice data stored in HubSpot -*/ -export class InvoiceReadResponse { - /** - * The invoice number. Note that this is _not_ the ID of the invoice, but the number that the billed customer will see. - */ - 'externalInvoiceNumber'?: string; - /** - * The total amount that this invoice is for. - */ - 'totalAmountBilled': number; - /** - * The remaining balance due for the invoice. - */ - 'balanceDue': number; - /** - * The ISO 4217 currency code that represents the currency of the invoice. - */ - 'currencyCode': string; - /** - * The due date of the invoice - */ - 'dueDate': string; - /** - * The id of the customer in the external accounting system that the invoice was sent to. - */ - 'externalRecipientId': string; - /** - * The datetime that that invoice was sent to the customer. - */ - 'receivedByRecipientDate'?: number; - /** - * The datetime that the invoice was created in the external accounting system. - */ - 'externalCreateDateTime'?: number; - /** - * Indicated is the invoice has been voided or not. - */ - 'isVoided': boolean; - /** - * The datetime that the invoice was created in HubSpot. - */ - 'createdAt': Date; - /** - * The datetime that the invoice was last updated in HubSpot. - */ - 'updatedAt': Date; - 'archivedAt'?: Date; - 'archived': boolean; - /** - * The id of the account in the external accounting system that this invoice is related to. - */ - 'externalAccountId': string; - /** - * The status of the invoice - */ - 'invoiceStatus': InvoiceReadResponseInvoiceStatusEnum; - /** - * The id of this invoice in the external accounting system. - */ - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "externalInvoiceNumber", - "baseName": "externalInvoiceNumber", - "type": "string", - "format": "" - }, - { - "name": "totalAmountBilled", - "baseName": "totalAmountBilled", - "type": "number", - "format": "" - }, - { - "name": "balanceDue", - "baseName": "balanceDue", - "type": "number", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - }, - { - "name": "dueDate", - "baseName": "dueDate", - "type": "string", - "format": "date" - }, - { - "name": "externalRecipientId", - "baseName": "externalRecipientId", - "type": "string", - "format": "" - }, - { - "name": "receivedByRecipientDate", - "baseName": "receivedByRecipientDate", - "type": "number", - "format": "int64" - }, - { - "name": "externalCreateDateTime", - "baseName": "externalCreateDateTime", - "type": "number", - "format": "int64" - }, - { - "name": "isVoided", - "baseName": "isVoided", - "type": "boolean", - "format": "" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "archivedAt", - "baseName": "archivedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "archived", - "baseName": "archived", - "type": "boolean", - "format": "" - }, - { - "name": "externalAccountId", - "baseName": "externalAccountId", - "type": "string", - "format": "" - }, - { - "name": "invoiceStatus", - "baseName": "invoiceStatus", - "type": "InvoiceReadResponseInvoiceStatusEnum", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoiceReadResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum InvoiceReadResponseInvoiceStatusEnum { - Created = 'CREATED', - Sent = 'SENT', - Paid = 'PAID', - Closed = 'CLOSED', - Overdue = 'OVERDUE', - Voided = 'VOIDED', - None = 'NONE', - Unpaid = 'UNPAID' -} - diff --git a/codegen/crm/extensions/accounting/models/InvoiceSearchResponse.ts b/codegen/crm/extensions/accounting/models/InvoiceSearchResponse.ts deleted file mode 100644 index 3fde12b54..000000000 --- a/codegen/crm/extensions/accounting/models/InvoiceSearchResponse.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountingExtensionInvoice } from '../models/AccountingExtensionInvoice'; - -/** -* A response to a search for invoices. -*/ -export class InvoiceSearchResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: InvoiceSearchResponseResultEnum; - /** - * The list of invoices that matched the search criteria. - */ - 'invoices': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "InvoiceSearchResponseResultEnum", - "format": "" - }, - { - "name": "invoices", - "baseName": "invoices", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoiceSearchResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum InvoiceSearchResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/InvoiceUpdateRequest.ts b/codegen/crm/extensions/accounting/models/InvoiceUpdateRequest.ts deleted file mode 100644 index 99c59667a..000000000 --- a/codegen/crm/extensions/accounting/models/InvoiceUpdateRequest.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* The invoice data to update in HubSpot -*/ -export class InvoiceUpdateRequest { - 'externalInvoiceNumber'?: string; - /** - * The ISO 4217 currency code that represents the currency used in the invoice to bill the recipient - */ - 'currencyCode'?: string; - /** - * The ISO-8601 due date of the invoice. - */ - 'dueDate'?: string; - /** - * The ID of the invoice recipient. This is the recipient ID from the external accounting system. - */ - 'externalRecipientId'?: string; - 'receivedByRecipientDate'?: number; - /** - * States if the invoice is voided or not. - */ - 'isVoided'?: boolean; - /** - * The ISO-8601 datetime of when the customer received the invoice. - */ - 'receivedByCustomerDate'?: string; - /** - * The number / name of the invoice. - */ - 'invoiceNumber'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "externalInvoiceNumber", - "baseName": "externalInvoiceNumber", - "type": "string", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - }, - { - "name": "dueDate", - "baseName": "dueDate", - "type": "string", - "format": "date" - }, - { - "name": "externalRecipientId", - "baseName": "externalRecipientId", - "type": "string", - "format": "" - }, - { - "name": "receivedByRecipientDate", - "baseName": "receivedByRecipientDate", - "type": "number", - "format": "int64" - }, - { - "name": "isVoided", - "baseName": "isVoided", - "type": "boolean", - "format": "" - }, - { - "name": "receivedByCustomerDate", - "baseName": "receivedByCustomerDate", - "type": "string", - "format": "" - }, - { - "name": "invoiceNumber", - "baseName": "invoiceNumber", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoiceUpdateRequest.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/InvoiceUpdateResponse.ts b/codegen/crm/extensions/accounting/models/InvoiceUpdateResponse.ts deleted file mode 100644 index 7ff7e28cc..000000000 --- a/codegen/crm/extensions/accounting/models/InvoiceUpdateResponse.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class InvoiceUpdateResponse { - 'externalInvoiceNumber'?: string; - 'totalAmountBilled': number; - 'balanceDue': number; - 'currencyCode': string; - 'dueDate': string; - 'externalRecipientId': string; - 'receivedByRecipientDate'?: number; - 'externalCreateDateTime'?: number; - 'isVoided': boolean; - 'createdAt': Date; - 'updatedAt': Date; - 'archivedAt'?: Date; - 'archived': boolean; - 'externalAccountId': string; - 'invoiceStatus': InvoiceUpdateResponseInvoiceStatusEnum; - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "externalInvoiceNumber", - "baseName": "externalInvoiceNumber", - "type": "string", - "format": "" - }, - { - "name": "totalAmountBilled", - "baseName": "totalAmountBilled", - "type": "number", - "format": "" - }, - { - "name": "balanceDue", - "baseName": "balanceDue", - "type": "number", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - }, - { - "name": "dueDate", - "baseName": "dueDate", - "type": "string", - "format": "date" - }, - { - "name": "externalRecipientId", - "baseName": "externalRecipientId", - "type": "string", - "format": "" - }, - { - "name": "receivedByRecipientDate", - "baseName": "receivedByRecipientDate", - "type": "number", - "format": "int64" - }, - { - "name": "externalCreateDateTime", - "baseName": "externalCreateDateTime", - "type": "number", - "format": "int64" - }, - { - "name": "isVoided", - "baseName": "isVoided", - "type": "boolean", - "format": "" - }, - { - "name": "createdAt", - "baseName": "createdAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "archivedAt", - "baseName": "archivedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "archived", - "baseName": "archived", - "type": "boolean", - "format": "" - }, - { - "name": "externalAccountId", - "baseName": "externalAccountId", - "type": "string", - "format": "" - }, - { - "name": "invoiceStatus", - "baseName": "invoiceStatus", - "type": "InvoiceUpdateResponseInvoiceStatusEnum", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoiceUpdateResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum InvoiceUpdateResponseInvoiceStatusEnum { - Created = 'CREATED', - Sent = 'SENT', - Paid = 'PAID', - Closed = 'CLOSED', - Overdue = 'OVERDUE', - Voided = 'VOIDED', - None = 'NONE', - Unpaid = 'UNPAID' -} - diff --git a/codegen/crm/extensions/accounting/models/InvoicesResponseExternal.ts b/codegen/crm/extensions/accounting/models/InvoicesResponseExternal.ts deleted file mode 100644 index 09528b2e8..000000000 --- a/codegen/crm/extensions/accounting/models/InvoicesResponseExternal.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountingExtensionInvoice } from '../models/AccountingExtensionInvoice'; - -/** -* A response to a request for invoices. -*/ -export class InvoicesResponseExternal { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: InvoicesResponseExternalResultEnum; - /** - * The list of invoices that were found for the request. - */ - 'invoices': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "InvoicesResponseExternalResultEnum", - "format": "" - }, - { - "name": "invoices", - "baseName": "invoices", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return InvoicesResponseExternal.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum InvoicesResponseExternalResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/ModelError.ts b/codegen/crm/extensions/accounting/models/ModelError.ts deleted file mode 100644 index a8147c3d6..000000000 --- a/codegen/crm/extensions/accounting/models/ModelError.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ErrorDetail } from '../models/ErrorDetail'; - -export class ModelError { - /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * A unique identifier for the request. Include this value with any error reports or support tickets - */ - 'correlationId': string; - /** - * The error category - */ - 'category': string; - /** - * A specific category that contains more specific detail about the error - */ - 'subCategory'?: string; - /** - * further information about the error - */ - 'errors'?: Array; - /** - * Context about the error condition - */ - 'context'?: { [key: string]: Array; }; - /** - * A map of link names to associated URIs containing documentation about the error or recommended remediation steps - */ - 'links'?: { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "correlationId", - "baseName": "correlationId", - "type": "string", - "format": "uuid" - }, - { - "name": "category", - "baseName": "category", - "type": "string", - "format": "" - }, - { - "name": "subCategory", - "baseName": "subCategory", - "type": "string", - "format": "" - }, - { - "name": "errors", - "baseName": "errors", - "type": "Array", - "format": "" - }, - { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ModelError.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/ObjectSerializer.ts b/codegen/crm/extensions/accounting/models/ObjectSerializer.ts deleted file mode 100644 index 658a7066a..000000000 --- a/codegen/crm/extensions/accounting/models/ObjectSerializer.ts +++ /dev/null @@ -1,387 +0,0 @@ -export * from '../models/AccountingAppSettings'; -export * from '../models/AccountingAppUrls'; -export * from '../models/AccountingExtensionCustomer'; -export * from '../models/AccountingExtensionInvoice'; -export * from '../models/AccountingExtensionTerm'; -export * from '../models/AccountingFeatures'; -export * from '../models/ActionResponse'; -export * from '../models/Address'; -export * from '../models/CreateInvoiceFeature'; -export * from '../models/CreateInvoiceSubFeatures'; -export * from '../models/CreateUserAccountRequestExternal'; -export * from '../models/CustomerSearchResponseExternal'; -export * from '../models/ErrorDetail'; -export * from '../models/ExchangeRateResponse'; -export * from '../models/ImportInvoiceFeature'; -export * from '../models/InvoiceCreatePaymentRequest'; -export * from '../models/InvoicePdfResponse'; -export * from '../models/InvoiceReadResponse'; -export * from '../models/InvoiceSearchResponse'; -export * from '../models/InvoiceUpdateRequest'; -export * from '../models/InvoiceUpdateResponse'; -export * from '../models/InvoicesResponseExternal'; -export * from '../models/ModelError'; -export * from '../models/ObjectSyncFeature'; -export * from '../models/Product'; -export * from '../models/ProductSearchResponse'; -export * from '../models/ResultIdAccountingResponse'; -export * from '../models/SyncContactsRequest'; -export * from '../models/SyncProductsRequest'; -export * from '../models/Tax'; -export * from '../models/TaxSearchResponse'; -export * from '../models/TaxType'; -export * from '../models/TermsResponse'; -export * from '../models/UnitPrice'; -export * from '../models/UpdatedContact'; -export * from '../models/UpdatedProduct'; - -import { AccountingAppSettings } from '../models/AccountingAppSettings'; -import { AccountingAppUrls } from '../models/AccountingAppUrls'; -import { AccountingExtensionCustomer } from '../models/AccountingExtensionCustomer'; -import { AccountingExtensionInvoice } from '../models/AccountingExtensionInvoice'; -import { AccountingExtensionTerm } from '../models/AccountingExtensionTerm'; -import { AccountingFeatures } from '../models/AccountingFeatures'; -import { ActionResponse } from '../models/ActionResponse'; -import { Address } from '../models/Address'; -import { CreateInvoiceFeature } from '../models/CreateInvoiceFeature'; -import { CreateInvoiceSubFeatures } from '../models/CreateInvoiceSubFeatures'; -import { CreateUserAccountRequestExternal } from '../models/CreateUserAccountRequestExternal'; -import { CustomerSearchResponseExternal } from '../models/CustomerSearchResponseExternal'; -import { ErrorDetail } from '../models/ErrorDetail'; -import { ExchangeRateResponse } from '../models/ExchangeRateResponse'; -import { ImportInvoiceFeature } from '../models/ImportInvoiceFeature'; -import { InvoiceCreatePaymentRequest } from '../models/InvoiceCreatePaymentRequest'; -import { InvoicePdfResponse } from '../models/InvoicePdfResponse'; -import { InvoiceReadResponse } from '../models/InvoiceReadResponse'; -import { InvoiceSearchResponse } from '../models/InvoiceSearchResponse'; -import { InvoiceUpdateRequest } from '../models/InvoiceUpdateRequest'; -import { InvoiceUpdateResponse } from '../models/InvoiceUpdateResponse'; -import { InvoicesResponseExternal } from '../models/InvoicesResponseExternal'; -import { ModelError } from '../models/ModelError'; -import { ObjectSyncFeature } from '../models/ObjectSyncFeature'; -import { Product } from '../models/Product'; -import { ProductSearchResponse } from '../models/ProductSearchResponse'; -import { ResultIdAccountingResponse } from '../models/ResultIdAccountingResponse'; -import { SyncContactsRequest } from '../models/SyncContactsRequest'; -import { SyncProductsRequest } from '../models/SyncProductsRequest'; -import { Tax } from '../models/Tax'; -import { TaxSearchResponse } from '../models/TaxSearchResponse'; -import { TaxType } from '../models/TaxType'; -import { TermsResponse } from '../models/TermsResponse'; -import { UnitPrice } from '../models/UnitPrice'; -import { UpdatedContact } from '../models/UpdatedContact'; -import { UpdatedProduct } from '../models/UpdatedProduct'; - -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" - ]; - -let enumsMap: Set = new Set([ - "AccountingExtensionInvoiceStatusEnum", - "ActionResponseStatusEnum", - "CustomerSearchResponseExternalResultEnum", - "ExchangeRateResponseResultEnum", - "InvoicePdfResponseResultEnum", - "InvoiceReadResponseInvoiceStatusEnum", - "InvoiceSearchResponseResultEnum", - "InvoiceUpdateResponseInvoiceStatusEnum", - "InvoicesResponseExternalResultEnum", - "ProductSearchResponseResultEnum", - "ResultIdAccountingResponseResultEnum", - "TaxSearchResponseResultEnum", - "TermsResponseResultEnum", - "UpdatedContactSyncActionEnum", - "UpdatedContactCustomerTypeEnum", - "UpdatedProductSyncActionEnum", -]); - -let typeMap: {[index: string]: any} = { - "AccountingAppSettings": AccountingAppSettings, - "AccountingAppUrls": AccountingAppUrls, - "AccountingExtensionCustomer": AccountingExtensionCustomer, - "AccountingExtensionInvoice": AccountingExtensionInvoice, - "AccountingExtensionTerm": AccountingExtensionTerm, - "AccountingFeatures": AccountingFeatures, - "ActionResponse": ActionResponse, - "Address": Address, - "CreateInvoiceFeature": CreateInvoiceFeature, - "CreateInvoiceSubFeatures": CreateInvoiceSubFeatures, - "CreateUserAccountRequestExternal": CreateUserAccountRequestExternal, - "CustomerSearchResponseExternal": CustomerSearchResponseExternal, - "ErrorDetail": ErrorDetail, - "ExchangeRateResponse": ExchangeRateResponse, - "ImportInvoiceFeature": ImportInvoiceFeature, - "InvoiceCreatePaymentRequest": InvoiceCreatePaymentRequest, - "InvoicePdfResponse": InvoicePdfResponse, - "InvoiceReadResponse": InvoiceReadResponse, - "InvoiceSearchResponse": InvoiceSearchResponse, - "InvoiceUpdateRequest": InvoiceUpdateRequest, - "InvoiceUpdateResponse": InvoiceUpdateResponse, - "InvoicesResponseExternal": InvoicesResponseExternal, - "ModelError": ModelError, - "ObjectSyncFeature": ObjectSyncFeature, - "Product": Product, - "ProductSearchResponse": ProductSearchResponse, - "ResultIdAccountingResponse": ResultIdAccountingResponse, - "SyncContactsRequest": SyncContactsRequest, - "SyncProductsRequest": SyncProductsRequest, - "Tax": Tax, - "TaxSearchResponse": TaxSearchResponse, - "TaxType": TaxType, - "TermsResponse": TermsResponse, - "UnitPrice": UnitPrice, - "UpdatedContact": UpdatedContact, - "UpdatedProduct": UpdatedProduct, -} - -type MimeTypeDescriptor = { - type: string; - subtype: string; - subtypeTokens: string[]; -}; - -/** - * Every mime-type consists of a type, subtype, and optional parameters. - * The subtype can be composite, including information about the content format. - * For example: `application/json-patch+json`, `application/merge-patch+json`. - * - * This helper transforms a string mime-type into an internal representation. - * This simplifies the implementation of predicates that in turn define common rules for parsing or stringifying - * the payload. - */ -const parseMimeType = (mimeType: string): MimeTypeDescriptor => { - const [type, subtype] = mimeType.split('/'); - return { - type, - subtype, - subtypeTokens: subtype.split('+'), - }; -}; - -type MimeTypePredicate = (mimeType: string) => boolean; - -// This factory creates a predicate function that checks a string mime-type against defined rules. -const mimeTypePredicateFactory = (predicate: (descriptor: MimeTypeDescriptor) => boolean): MimeTypePredicate => (mimeType) => predicate(parseMimeType(mimeType)); - -// Use this factory when you need to define a simple predicate based only on type and, if applicable, subtype. -const mimeTypeSimplePredicateFactory = (type: string, subtype?: string): MimeTypePredicate => mimeTypePredicateFactory((descriptor) => { - if (descriptor.type !== type) return false; - if (subtype != null && descriptor.subtype !== subtype) return false; - return true; -}); - -// Creating a set of named predicates that will help us determine how to handle different mime-types -const isTextLikeMimeType = mimeTypeSimplePredicateFactory('text'); -const isJsonMimeType = mimeTypeSimplePredicateFactory('application', 'json'); -const isJsonLikeMimeType = mimeTypePredicateFactory((descriptor) => descriptor.type === 'application' && descriptor.subtypeTokens.some((item) => item === 'json')); -const isOctetStreamMimeType = mimeTypeSimplePredicateFactory('application', 'octet-stream'); -const isFormUrlencodedMimeType = mimeTypeSimplePredicateFactory('application', 'x-www-form-urlencoded'); - -// Defining a list of mime-types in the order of prioritization for handling. -const supportedMimeTypePredicatesWithPriority: MimeTypePredicate[] = [ - isJsonMimeType, - isJsonLikeMimeType, - isTextLikeMimeType, - isOctetStreamMimeType, - isFormUrlencodedMimeType, -]; - -export class ObjectSerializer { - public static findCorrectType(data: any, expectedType: string) { - if (data == undefined) { - return expectedType; - } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } else if (expectedType === "Date") { - return expectedType; - } else { - if (enumsMap.has(expectedType)) { - return expectedType; - } - - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } - } else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - - public static serialize(data: any, type: string, format: string) { - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let date of data) { - transformedData.push(ObjectSerializer.serialize(date, subType, format)); - } - return transformedData; - } else if (type === "Date") { - if (format == "date") { - let month = data.getMonth()+1 - month = month < 10 ? "0" + month.toString() : month.toString() - let day = data.getDate(); - day = day < 10 ? "0" + day.toString() : day.toString(); - - return data.getFullYear() + "-" + month + "-" + day; - } else { - return data.toISOString(); - } - } else { - if (enumsMap.has(type)) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - - // Get the actual type of this object - type = this.findCorrectType(data, type); - - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance: {[index: string]: any} = {}; - for (let attributeType of attributeTypes) { - instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); - } - return instance; - } - } - - public static deserialize(data: any, type: string, format: string) { - // polymorphism may change the actual type. - type = ObjectSerializer.findCorrectType(data, type); - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let date of data) { - transformedData.push(ObjectSerializer.deserialize(date, subType, format)); - } - return transformedData; - } else if (type === "Date") { - return new Date(data); - } else { - if (enumsMap.has(type)) {// is Enum - return data; - } - - if (!typeMap[type]) { // dont know the type - return data; - } - let instance = new typeMap[type](); - let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let attributeType of attributeTypes) { - let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); - if (value !== undefined) { - instance[attributeType.name] = value; - } - } - return instance; - } - } - - - /** - * Normalize media type - * - * We currently do not handle any media types attributes, i.e. anything - * after a semicolon. All content is assumed to be UTF-8 compatible. - */ - public static normalizeMediaType(mediaType: string | undefined): string | undefined { - if (mediaType === undefined) { - return undefined; - } - return mediaType.split(";")[0].trim().toLowerCase(); - } - - /** - * From a list of possible media types, choose the one we can handle best. - * - * The order of the given media types does not have any impact on the choice - * made. - */ - public static getPreferredMediaType(mediaTypes: Array): string { - /** According to OAS 3 we should default to json */ - if (mediaTypes.length === 0) { - return "application/json"; - } - - const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); - - for (const predicate of supportedMimeTypePredicatesWithPriority) { - for (const mediaType of normalMediaTypes) { - if (mediaType != null && predicate(mediaType)) { - return mediaType; - } - } - } - - throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); - } - - /** - * Convert data to a string according the given media type - */ - public static stringify(data: any, mediaType: string): string { - if (isTextLikeMimeType(mediaType)) { - return String(data); - } - - if (isJsonLikeMimeType(mediaType)) { - return JSON.stringify(data); - } - - throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); - } - - /** - * Parse data from a string according to the given media type - */ - public static parse(rawData: string, mediaType: string | undefined) { - if (mediaType === undefined) { - throw new Error("Cannot parse content. No Content-Type defined."); - } - - if (isTextLikeMimeType(mediaType)) { - return rawData; - } - - if (isJsonLikeMimeType(mediaType)) { - return JSON.parse(rawData); - } - - throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); - } -} diff --git a/codegen/crm/extensions/accounting/models/ObjectSyncFeature.ts b/codegen/crm/extensions/accounting/models/ObjectSyncFeature.ts deleted file mode 100644 index c1ae73dae..000000000 --- a/codegen/crm/extensions/accounting/models/ObjectSyncFeature.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ObjectSyncFeature { - /** - * Indicates if syncing the object type from the external accounting system into HubSpot is supported. - */ - 'toHubSpot': boolean; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "toHubSpot", - "baseName": "toHubSpot", - "type": "boolean", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ObjectSyncFeature.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/Product.ts b/codegen/crm/extensions/accounting/models/Product.ts deleted file mode 100644 index f60e35a28..000000000 --- a/codegen/crm/extensions/accounting/models/Product.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { TaxType } from '../models/TaxType'; -import { UnitPrice } from '../models/UnitPrice'; - -/** -* Representation of a product in the external accounting system. -*/ -export class Product { - 'unitPrice': UnitPrice; - /** - * Identifies if the product is tax exempt or not. - */ - 'taxExempt': boolean; - 'salesTaxType'?: TaxType; - /** - * The display name of the product. - */ - 'name': string; - /** - * The description of the product. - */ - 'description'?: string; - /** - * The ID of the product in the external accounting system. - */ - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "unitPrice", - "baseName": "unitPrice", - "type": "UnitPrice", - "format": "" - }, - { - "name": "taxExempt", - "baseName": "taxExempt", - "type": "boolean", - "format": "" - }, - { - "name": "salesTaxType", - "baseName": "salesTaxType", - "type": "TaxType", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "description", - "baseName": "description", - "type": "string", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return Product.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/ProductSearchResponse.ts b/codegen/crm/extensions/accounting/models/ProductSearchResponse.ts deleted file mode 100644 index ae4d5419f..000000000 --- a/codegen/crm/extensions/accounting/models/ProductSearchResponse.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { Product } from '../models/Product'; - -/** -* A response to a search for products. -*/ -export class ProductSearchResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: ProductSearchResponseResultEnum; - /** - * The list of products that matched the search criteria. - */ - 'products': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "ProductSearchResponseResultEnum", - "format": "" - }, - { - "name": "products", - "baseName": "products", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ProductSearchResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum ProductSearchResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/ResultIdAccountingResponse.ts b/codegen/crm/extensions/accounting/models/ResultIdAccountingResponse.ts deleted file mode 100644 index e19fecea9..000000000 --- a/codegen/crm/extensions/accounting/models/ResultIdAccountingResponse.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A response to the creation of an entity (eg. invoice, customer). -*/ -export class ResultIdAccountingResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result': ResultIdAccountingResponseResultEnum; - /** - * The ID of created entity. - */ - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "ResultIdAccountingResponseResultEnum", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ResultIdAccountingResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum ResultIdAccountingResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/SyncContactsRequest.ts b/codegen/crm/extensions/accounting/models/SyncContactsRequest.ts deleted file mode 100644 index 2bfa9b6f5..000000000 --- a/codegen/crm/extensions/accounting/models/SyncContactsRequest.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { UpdatedContact } from '../models/UpdatedContact'; - -/** -* A request to import external accounting contact properties in HubSpot -*/ -export class SyncContactsRequest { - /** - * The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system. - */ - 'accountId': string; - /** - * A list of contacts to be imported. - */ - 'contacts': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "accountId", - "baseName": "accountId", - "type": "string", - "format": "" - }, - { - "name": "contacts", - "baseName": "contacts", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SyncContactsRequest.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/SyncProductsRequest.ts b/codegen/crm/extensions/accounting/models/SyncProductsRequest.ts deleted file mode 100644 index 6a521b22d..000000000 --- a/codegen/crm/extensions/accounting/models/SyncProductsRequest.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { UpdatedProduct } from '../models/UpdatedProduct'; - -/** -* A request to import external accounting product properties in HubSpot -*/ -export class SyncProductsRequest { - /** - * The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system. - */ - 'accountId': string; - /** - * A list of products to be imported. - */ - 'products': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "accountId", - "baseName": "accountId", - "type": "string", - "format": "" - }, - { - "name": "products", - "baseName": "products", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SyncProductsRequest.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/Tax.ts b/codegen/crm/extensions/accounting/models/Tax.ts deleted file mode 100644 index 8f9092b3a..000000000 --- a/codegen/crm/extensions/accounting/models/Tax.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Representation of a tax defined in the external accounting system. -*/ -export class Tax { - /** - * The code/ID of the tax in the external accounting system. - */ - 'code': string; - /** - * The tax percentage. For example, 8.05 represents a 8.05% tax rate. - */ - 'percentage': number; - /** - * The display name of the tax. - */ - 'name': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "string", - "format": "" - }, - { - "name": "percentage", - "baseName": "percentage", - "type": "number", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return Tax.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/TaxSearchResponse.ts b/codegen/crm/extensions/accounting/models/TaxSearchResponse.ts deleted file mode 100644 index fae711beb..000000000 --- a/codegen/crm/extensions/accounting/models/TaxSearchResponse.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { Tax } from '../models/Tax'; - -/** -* A response to a search for taxes. -*/ -export class TaxSearchResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: TaxSearchResponseResultEnum; - /** - * The list of taxes that matched the search criteria - */ - 'taxes': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "TaxSearchResponseResultEnum", - "format": "" - }, - { - "name": "taxes", - "baseName": "taxes", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return TaxSearchResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum TaxSearchResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/TaxType.ts b/codegen/crm/extensions/accounting/models/TaxType.ts deleted file mode 100644 index faee7b6d8..000000000 --- a/codegen/crm/extensions/accounting/models/TaxType.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Represents a tax in the external accounting system. -*/ -export class TaxType { - /** - * The code/ID of the tax in the external accounting system. - */ - 'code': string; - /** - * The display name of the tax. - */ - 'name'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return TaxType.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/TermsResponse.ts b/codegen/crm/extensions/accounting/models/TermsResponse.ts deleted file mode 100644 index cfcde1a80..000000000 --- a/codegen/crm/extensions/accounting/models/TermsResponse.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountingExtensionTerm } from '../models/AccountingExtensionTerm'; - -/** -* A response to a search for payment terms. -*/ -export class TermsResponse { - /** - * Designates if the response is a success (\'OK\') or failure (\'ERR\'). - */ - 'result'?: TermsResponseResultEnum; - /** - * The list of payment terms that matched the search criteria. - */ - 'terms': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "result", - "baseName": "@result", - "type": "TermsResponseResultEnum", - "format": "" - }, - { - "name": "terms", - "baseName": "terms", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return TermsResponse.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum TermsResponseResultEnum { - Ok = 'OK', - Err = 'ERR' -} - diff --git a/codegen/crm/extensions/accounting/models/UnitPrice.ts b/codegen/crm/extensions/accounting/models/UnitPrice.ts deleted file mode 100644 index 4c327a9da..000000000 --- a/codegen/crm/extensions/accounting/models/UnitPrice.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Represents a unit price -*/ -export class UnitPrice { - /** - * The actual unit price amount. - */ - 'amount'?: number; - /** - * Indicates if the unit price amount already includes taxes. - */ - 'taxIncluded': boolean; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "amount", - "baseName": "amount", - "type": "number", - "format": "" - }, - { - "name": "taxIncluded", - "baseName": "taxIncluded", - "type": "boolean", - "format": "" - } ]; - - static getAttributeTypeMap() { - return UnitPrice.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/extensions/accounting/models/UpdatedContact.ts b/codegen/crm/extensions/accounting/models/UpdatedContact.ts deleted file mode 100644 index 163741df1..000000000 --- a/codegen/crm/extensions/accounting/models/UpdatedContact.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A request to import external accounting contact properties in HubSpot -*/ -export class UpdatedContact { - /** - * The operation to be performed. - */ - 'syncAction': UpdatedContactSyncActionEnum; - /** - * The timestamp (ISO8601 format) when the customer was updated in the external accounting system. - */ - 'updatedAt': Date; - /** - * The customer\'s email address - */ - 'emailAddress': string; - /** - * The ID of the customer in the external accounting system. - */ - 'id': string; - /** - * Designates the type of the customer object. - */ - 'customerType'?: UpdatedContactCustomerTypeEnum; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "syncAction", - "baseName": "syncAction", - "type": "UpdatedContactSyncActionEnum", - "format": "" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "emailAddress", - "baseName": "emailAddress", - "type": "string", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "customerType", - "baseName": "customerType", - "type": "UpdatedContactCustomerTypeEnum", - "format": "" - } ]; - - static getAttributeTypeMap() { - return UpdatedContact.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum UpdatedContactSyncActionEnum { - Create = 'CREATE', - Update = 'UPDATE', - Delete = 'DELETE' -} -export enum UpdatedContactCustomerTypeEnum { - Contact = 'CONTACT', - Company = 'COMPANY' -} - diff --git a/codegen/crm/extensions/accounting/models/UpdatedProduct.ts b/codegen/crm/extensions/accounting/models/UpdatedProduct.ts deleted file mode 100644 index ca657edb9..000000000 --- a/codegen/crm/extensions/accounting/models/UpdatedProduct.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Accounting Extension - * These APIs allow you to interact with HubSpot\'s Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A request to import external accounting product properties in HubSpot -*/ -export class UpdatedProduct { - /** - * The operation to be performed. - */ - 'syncAction': UpdatedProductSyncActionEnum; - /** - * The timestamp (ISO8601 format) when the product was updated in the external accounting system. - */ - 'updatedAt': Date; - /** - * The price of the product. - */ - 'price': number; - /** - * The ISO 4217 currency code that represents the currency of the product price. - */ - 'currencyCode'?: string; - /** - * The ID of the product in the external accounting system. - */ - 'id': string; - /** - * A map of key-value product properties to be imported. - */ - 'properties': { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "syncAction", - "baseName": "syncAction", - "type": "UpdatedProductSyncActionEnum", - "format": "" - }, - { - "name": "updatedAt", - "baseName": "updatedAt", - "type": "Date", - "format": "date-time" - }, - { - "name": "price", - "baseName": "price", - "type": "number", - "format": "" - }, - { - "name": "currencyCode", - "baseName": "currencyCode", - "type": "string", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return UpdatedProduct.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum UpdatedProductSyncActionEnum { - Create = 'CREATE', - Update = 'UPDATE', - Delete = 'DELETE' -} - diff --git a/codegen/crm/extensions/accounting/models/all.ts b/codegen/crm/extensions/accounting/models/all.ts deleted file mode 100644 index a0289716b..000000000 --- a/codegen/crm/extensions/accounting/models/all.ts +++ /dev/null @@ -1,36 +0,0 @@ -export * from '../models/AccountingAppSettings' -export * from '../models/AccountingAppUrls' -export * from '../models/AccountingExtensionCustomer' -export * from '../models/AccountingExtensionInvoice' -export * from '../models/AccountingExtensionTerm' -export * from '../models/AccountingFeatures' -export * from '../models/ActionResponse' -export * from '../models/Address' -export * from '../models/CreateInvoiceFeature' -export * from '../models/CreateInvoiceSubFeatures' -export * from '../models/CreateUserAccountRequestExternal' -export * from '../models/CustomerSearchResponseExternal' -export * from '../models/ErrorDetail' -export * from '../models/ExchangeRateResponse' -export * from '../models/ImportInvoiceFeature' -export * from '../models/InvoiceCreatePaymentRequest' -export * from '../models/InvoicePdfResponse' -export * from '../models/InvoiceReadResponse' -export * from '../models/InvoiceSearchResponse' -export * from '../models/InvoiceUpdateRequest' -export * from '../models/InvoiceUpdateResponse' -export * from '../models/InvoicesResponseExternal' -export * from '../models/ModelError' -export * from '../models/ObjectSyncFeature' -export * from '../models/Product' -export * from '../models/ProductSearchResponse' -export * from '../models/ResultIdAccountingResponse' -export * from '../models/SyncContactsRequest' -export * from '../models/SyncProductsRequest' -export * from '../models/Tax' -export * from '../models/TaxSearchResponse' -export * from '../models/TaxType' -export * from '../models/TermsResponse' -export * from '../models/UnitPrice' -export * from '../models/UpdatedContact' -export * from '../models/UpdatedProduct' diff --git a/codegen/crm/extensions/accounting/rxjsStub.ts b/codegen/crm/extensions/accounting/rxjsStub.ts deleted file mode 100644 index 4c73715a2..000000000 --- a/codegen/crm/extensions/accounting/rxjsStub.ts +++ /dev/null @@ -1,27 +0,0 @@ -export class Observable { - constructor(private promise: Promise) {} - - toPromise() { - return this.promise; - } - - pipe(callback: (value: T) => S | Promise): Observable { - return new Observable(this.promise.then(callback)); - } -} - -export function from(promise: Promise) { - return new Observable(promise); -} - -export function of(value: T) { - return new Observable(Promise.resolve(value)); -} - -export function mergeMap(callback: (value: T) => Observable) { - return (value: T) => callback(value).toPromise(); -} - -export function map(callback: any) { - return callback; -} diff --git a/codegen/crm/extensions/accounting/servers.ts b/codegen/crm/extensions/accounting/servers.ts deleted file mode 100644 index 022acd6fd..000000000 --- a/codegen/crm/extensions/accounting/servers.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { RequestContext, HttpMethod } from "./http/http"; - -export interface BaseServerConfiguration { - makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; -} - -/** - * - * Represents the configuration of a server including its - * url template and variable configuration based on the url. - * - */ -export class ServerConfiguration implements BaseServerConfiguration { - public constructor(private url: string, private variableConfiguration: T) {} - - /** - * Sets the value of the variables of this server. Variables are included in - * the `url` of this ServerConfiguration in the form `{variableName}` - * - * @param variableConfiguration a partial variable configuration for the - * variables contained in the url - */ - public setVariables(variableConfiguration: Partial) { - Object.assign(this.variableConfiguration, variableConfiguration); - } - - public getConfiguration(): T { - return this.variableConfiguration - } - - private getUrl() { - let replacedUrl = this.url; - for (const key in this.variableConfiguration) { - var re = new RegExp("{" + key + "}","g"); - replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); - } - return replacedUrl - } - - /** - * Creates a new request context for this server using the url with variables - * replaced with their respective values and the endpoint of the request appended. - * - * @param endpoint the endpoint to be queried on the server - * @param httpMethod httpMethod to be used - * - */ - public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext { - return new RequestContext(this.getUrl() + endpoint, httpMethod); - } -} - -export const server1 = new ServerConfiguration<{ }>("https://api.hubapi.com", { }) - -export const servers = [server1]; diff --git a/codegen/crm/extensions/accounting/types/ObjectParamAPI.ts b/codegen/crm/extensions/accounting/types/ObjectParamAPI.ts deleted file mode 100644 index 4d50b2f10..000000000 --- a/codegen/crm/extensions/accounting/types/ObjectParamAPI.ts +++ /dev/null @@ -1,702 +0,0 @@ -import { HttpInfo } from '../http/http'; -import { Configuration} from '../configuration' - -import { AccountingAppSettings } from '../models/AccountingAppSettings'; -import { ActionResponse } from '../models/ActionResponse'; -import { CreateUserAccountRequestExternal } from '../models/CreateUserAccountRequestExternal'; -import { CustomerSearchResponseExternal } from '../models/CustomerSearchResponseExternal'; -import { ExchangeRateResponse } from '../models/ExchangeRateResponse'; -import { InvoiceCreatePaymentRequest } from '../models/InvoiceCreatePaymentRequest'; -import { InvoicePdfResponse } from '../models/InvoicePdfResponse'; -import { InvoiceReadResponse } from '../models/InvoiceReadResponse'; -import { InvoiceSearchResponse } from '../models/InvoiceSearchResponse'; -import { InvoiceUpdateRequest } from '../models/InvoiceUpdateRequest'; -import { InvoiceUpdateResponse } from '../models/InvoiceUpdateResponse'; -import { InvoicesResponseExternal } from '../models/InvoicesResponseExternal'; -import { ProductSearchResponse } from '../models/ProductSearchResponse'; -import { ResultIdAccountingResponse } from '../models/ResultIdAccountingResponse'; -import { SyncContactsRequest } from '../models/SyncContactsRequest'; -import { SyncProductsRequest } from '../models/SyncProductsRequest'; -import { TaxSearchResponse } from '../models/TaxSearchResponse'; -import { TermsResponse } from '../models/TermsResponse'; - -import { ObservableCallbacksApi } from "./ObservableAPI"; -import { CallbacksApiRequestFactory, CallbacksApiResponseProcessor} from "../apis/CallbacksApi"; - -export interface CallbacksApiCreateCustomerRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApicreateCustomer - */ - requestId: string - /** - * The ID of the created customer. - * @type ResultIdAccountingResponse - * @memberof CallbacksApicreateCustomer - */ - resultIdAccountingResponse: ResultIdAccountingResponse -} - -export interface CallbacksApiCreateExchangeRateRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApicreateExchangeRate - */ - requestId: string - /** - * The result of the exchange rate request. - * @type ExchangeRateResponse - * @memberof CallbacksApicreateExchangeRate - */ - exchangeRateResponse: ExchangeRateResponse -} - -export interface CallbacksApiCreateInvoiceRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApicreateInvoice - */ - requestId: string - /** - * The ID of the created invoice. - * @type ResultIdAccountingResponse - * @memberof CallbacksApicreateInvoice - */ - resultIdAccountingResponse: ResultIdAccountingResponse -} - -export interface CallbacksApiCreateTermRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApicreateTerm - */ - requestId: string - /** - * The result of the terms search - * @type TermsResponse - * @memberof CallbacksApicreateTerm - */ - termsResponse: TermsResponse -} - -export interface CallbacksApiDoCustomerSearchRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApidoCustomerSearch - */ - requestId: string - /** - * The result of the customer search request. - * @type CustomerSearchResponseExternal - * @memberof CallbacksApidoCustomerSearch - */ - customerSearchResponseExternal: CustomerSearchResponseExternal -} - -export interface CallbacksApiDoInvoiceSearchRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApidoInvoiceSearch - */ - requestId: string - /** - * The result of the invoice search request. - * @type InvoiceSearchResponse - * @memberof CallbacksApidoInvoiceSearch - */ - invoiceSearchResponse: InvoiceSearchResponse -} - -export interface CallbacksApiDoProductSearchRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApidoProductSearch - */ - requestId: string - /** - * The result of the product search request. - * @type ProductSearchResponse - * @memberof CallbacksApidoProductSearch - */ - productSearchResponse: ProductSearchResponse -} - -export interface CallbacksApiDoTaxSearchRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApidoTaxSearch - */ - requestId: string - /** - * The result of the taxes search request. - * @type TaxSearchResponse - * @memberof CallbacksApidoTaxSearch - */ - taxSearchResponse: TaxSearchResponse -} - -export interface CallbacksApiGetByIdRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApigetById - */ - requestId: string - /** - * The result of the invoice request. - * @type InvoicesResponseExternal - * @memberof CallbacksApigetById - */ - invoicesResponseExternal: InvoicesResponseExternal -} - -export interface CallbacksApiInvoicePdfRequest { - /** - * The ID of the request that this response is for - * @type string - * @memberof CallbacksApiinvoicePdf - */ - requestId: string - /** - * The bytes of the invoice PDF. - * @type InvoicePdfResponse - * @memberof CallbacksApiinvoicePdf - */ - invoicePdfResponse: InvoicePdfResponse -} - -export class ObjectCallbacksApi { - private api: ObservableCallbacksApi - - public constructor(configuration: Configuration, requestFactory?: CallbacksApiRequestFactory, responseProcessor?: CallbacksApiResponseProcessor) { - this.api = new ObservableCallbacksApi(configuration, requestFactory, responseProcessor); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param param the request object - */ - public createCustomerWithHttpInfo(param: CallbacksApiCreateCustomerRequest, options?: Configuration): Promise> { - return this.api.createCustomerWithHttpInfo(param.requestId, param.resultIdAccountingResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param param the request object - */ - public createCustomer(param: CallbacksApiCreateCustomerRequest, options?: Configuration): Promise { - return this.api.createCustomer(param.requestId, param.resultIdAccountingResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param param the request object - */ - public createExchangeRateWithHttpInfo(param: CallbacksApiCreateExchangeRateRequest, options?: Configuration): Promise> { - return this.api.createExchangeRateWithHttpInfo(param.requestId, param.exchangeRateResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param param the request object - */ - public createExchangeRate(param: CallbacksApiCreateExchangeRateRequest, options?: Configuration): Promise { - return this.api.createExchangeRate(param.requestId, param.exchangeRateResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param param the request object - */ - public createInvoiceWithHttpInfo(param: CallbacksApiCreateInvoiceRequest, options?: Configuration): Promise> { - return this.api.createInvoiceWithHttpInfo(param.requestId, param.resultIdAccountingResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param param the request object - */ - public createInvoice(param: CallbacksApiCreateInvoiceRequest, options?: Configuration): Promise { - return this.api.createInvoice(param.requestId, param.resultIdAccountingResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param param the request object - */ - public createTermWithHttpInfo(param: CallbacksApiCreateTermRequest, options?: Configuration): Promise> { - return this.api.createTermWithHttpInfo(param.requestId, param.termsResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param param the request object - */ - public createTerm(param: CallbacksApiCreateTermRequest, options?: Configuration): Promise { - return this.api.createTerm(param.requestId, param.termsResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param param the request object - */ - public doCustomerSearchWithHttpInfo(param: CallbacksApiDoCustomerSearchRequest, options?: Configuration): Promise> { - return this.api.doCustomerSearchWithHttpInfo(param.requestId, param.customerSearchResponseExternal, options).toPromise(); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param param the request object - */ - public doCustomerSearch(param: CallbacksApiDoCustomerSearchRequest, options?: Configuration): Promise { - return this.api.doCustomerSearch(param.requestId, param.customerSearchResponseExternal, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param param the request object - */ - public doInvoiceSearchWithHttpInfo(param: CallbacksApiDoInvoiceSearchRequest, options?: Configuration): Promise> { - return this.api.doInvoiceSearchWithHttpInfo(param.requestId, param.invoiceSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param param the request object - */ - public doInvoiceSearch(param: CallbacksApiDoInvoiceSearchRequest, options?: Configuration): Promise { - return this.api.doInvoiceSearch(param.requestId, param.invoiceSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param param the request object - */ - public doProductSearchWithHttpInfo(param: CallbacksApiDoProductSearchRequest, options?: Configuration): Promise> { - return this.api.doProductSearchWithHttpInfo(param.requestId, param.productSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param param the request object - */ - public doProductSearch(param: CallbacksApiDoProductSearchRequest, options?: Configuration): Promise { - return this.api.doProductSearch(param.requestId, param.productSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param param the request object - */ - public doTaxSearchWithHttpInfo(param: CallbacksApiDoTaxSearchRequest, options?: Configuration): Promise> { - return this.api.doTaxSearchWithHttpInfo(param.requestId, param.taxSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param param the request object - */ - public doTaxSearch(param: CallbacksApiDoTaxSearchRequest, options?: Configuration): Promise { - return this.api.doTaxSearch(param.requestId, param.taxSearchResponse, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param param the request object - */ - public getByIdWithHttpInfo(param: CallbacksApiGetByIdRequest, options?: Configuration): Promise> { - return this.api.getByIdWithHttpInfo(param.requestId, param.invoicesResponseExternal, options).toPromise(); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param param the request object - */ - public getById(param: CallbacksApiGetByIdRequest, options?: Configuration): Promise { - return this.api.getById(param.requestId, param.invoicesResponseExternal, options).toPromise(); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param param the request object - */ - public invoicePdfWithHttpInfo(param: CallbacksApiInvoicePdfRequest, options?: Configuration): Promise> { - return this.api.invoicePdfWithHttpInfo(param.requestId, param.invoicePdfResponse, options).toPromise(); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param param the request object - */ - public invoicePdf(param: CallbacksApiInvoicePdfRequest, options?: Configuration): Promise { - return this.api.invoicePdf(param.requestId, param.invoicePdfResponse, options).toPromise(); - } - -} - -import { ObservableInvoiceApi } from "./ObservableAPI"; -import { InvoiceApiRequestFactory, InvoiceApiResponseProcessor} from "../apis/InvoiceApi"; - -export interface InvoiceApiCreatePaymentRequest { - /** - * The ID of the invoice. This is the invoice ID from the external accounting system. - * @type string - * @memberof InvoiceApicreatePayment - */ - invoiceId: string - /** - * The payment information - * @type InvoiceCreatePaymentRequest - * @memberof InvoiceApicreatePayment - */ - invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest - /** - * The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @type string - * @memberof InvoiceApicreatePayment - */ - accountId?: string -} - -export interface InvoiceApiGetByIdRequest { - /** - * The ID of the invoice. This is the invoice ID from the external accounting system. - * @type string - * @memberof InvoiceApigetById - */ - invoiceId: string - /** - * The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @type string - * @memberof InvoiceApigetById - */ - accountId: string -} - -export interface InvoiceApiUpdateRequest { - /** - * The ID of the invoice. This is the invoice ID from the external accounting system. - * @type string - * @memberof InvoiceApiupdate - */ - invoiceId: string - /** - * The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @type string - * @memberof InvoiceApiupdate - */ - accountId: string - /** - * The invoice data to update - * @type InvoiceUpdateRequest - * @memberof InvoiceApiupdate - */ - invoiceUpdateRequest: InvoiceUpdateRequest -} - -export class ObjectInvoiceApi { - private api: ObservableInvoiceApi - - public constructor(configuration: Configuration, requestFactory?: InvoiceApiRequestFactory, responseProcessor?: InvoiceApiResponseProcessor) { - this.api = new ObservableInvoiceApi(configuration, requestFactory, responseProcessor); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param param the request object - */ - public createPaymentWithHttpInfo(param: InvoiceApiCreatePaymentRequest, options?: Configuration): Promise> { - return this.api.createPaymentWithHttpInfo(param.invoiceId, param.invoiceCreatePaymentRequest, param.accountId, options).toPromise(); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param param the request object - */ - public createPayment(param: InvoiceApiCreatePaymentRequest, options?: Configuration): Promise { - return this.api.createPayment(param.invoiceId, param.invoiceCreatePaymentRequest, param.accountId, options).toPromise(); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param param the request object - */ - public getByIdWithHttpInfo(param: InvoiceApiGetByIdRequest, options?: Configuration): Promise> { - return this.api.getByIdWithHttpInfo(param.invoiceId, param.accountId, options).toPromise(); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param param the request object - */ - public getById(param: InvoiceApiGetByIdRequest, options?: Configuration): Promise { - return this.api.getById(param.invoiceId, param.accountId, options).toPromise(); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param param the request object - */ - public updateWithHttpInfo(param: InvoiceApiUpdateRequest, options?: Configuration): Promise> { - return this.api.updateWithHttpInfo(param.invoiceId, param.accountId, param.invoiceUpdateRequest, options).toPromise(); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param param the request object - */ - public update(param: InvoiceApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.invoiceId, param.accountId, param.invoiceUpdateRequest, options).toPromise(); - } - -} - -import { ObservableSettingsApi } from "./ObservableAPI"; -import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; - -export interface SettingsApiGetByIdRequest { - /** - * The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @type number - * @memberof SettingsApigetById - */ - appId: number -} - -export interface SettingsApiReplaceRequest { - /** - * The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @type number - * @memberof SettingsApireplace - */ - appId: number - /** - * - * @type AccountingAppSettings - * @memberof SettingsApireplace - */ - accountingAppSettings: AccountingAppSettings -} - -export class ObjectSettingsApi { - private api: ObservableSettingsApi - - public constructor(configuration: Configuration, requestFactory?: SettingsApiRequestFactory, responseProcessor?: SettingsApiResponseProcessor) { - this.api = new ObservableSettingsApi(configuration, requestFactory, responseProcessor); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param param the request object - */ - public getByIdWithHttpInfo(param: SettingsApiGetByIdRequest, options?: Configuration): Promise> { - return this.api.getByIdWithHttpInfo(param.appId, options).toPromise(); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param param the request object - */ - public getById(param: SettingsApiGetByIdRequest, options?: Configuration): Promise { - return this.api.getById(param.appId, options).toPromise(); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param param the request object - */ - public replaceWithHttpInfo(param: SettingsApiReplaceRequest, options?: Configuration): Promise> { - return this.api.replaceWithHttpInfo(param.appId, param.accountingAppSettings, options).toPromise(); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param param the request object - */ - public replace(param: SettingsApiReplaceRequest, options?: Configuration): Promise { - return this.api.replace(param.appId, param.accountingAppSettings, options).toPromise(); - } - -} - -import { ObservableSyncApi } from "./ObservableAPI"; -import { SyncApiRequestFactory, SyncApiResponseProcessor} from "../apis/SyncApi"; - -export interface SyncApiCreateContactRequest { - /** - * The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @type number - * @memberof SyncApicreateContact - */ - appId: number - /** - * - * @type SyncContactsRequest - * @memberof SyncApicreateContact - */ - syncContactsRequest: SyncContactsRequest -} - -export interface SyncApiCreateProductRequest { - /** - * The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @type number - * @memberof SyncApicreateProduct - */ - appId: number - /** - * - * @type SyncProductsRequest - * @memberof SyncApicreateProduct - */ - syncProductsRequest: SyncProductsRequest -} - -export class ObjectSyncApi { - private api: ObservableSyncApi - - public constructor(configuration: Configuration, requestFactory?: SyncApiRequestFactory, responseProcessor?: SyncApiResponseProcessor) { - this.api = new ObservableSyncApi(configuration, requestFactory, responseProcessor); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param param the request object - */ - public createContactWithHttpInfo(param: SyncApiCreateContactRequest, options?: Configuration): Promise> { - return this.api.createContactWithHttpInfo(param.appId, param.syncContactsRequest, options).toPromise(); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param param the request object - */ - public createContact(param: SyncApiCreateContactRequest, options?: Configuration): Promise { - return this.api.createContact(param.appId, param.syncContactsRequest, options).toPromise(); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param param the request object - */ - public createProductWithHttpInfo(param: SyncApiCreateProductRequest, options?: Configuration): Promise> { - return this.api.createProductWithHttpInfo(param.appId, param.syncProductsRequest, options).toPromise(); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param param the request object - */ - public createProduct(param: SyncApiCreateProductRequest, options?: Configuration): Promise { - return this.api.createProduct(param.appId, param.syncProductsRequest, options).toPromise(); - } - -} - -import { ObservableUserAccountsApi } from "./ObservableAPI"; -import { UserAccountsApiRequestFactory, UserAccountsApiResponseProcessor} from "../apis/UserAccountsApi"; - -export interface UserAccountsApiArchiveRequest { - /** - * The ID of the user account to delete. - * @type string - * @memberof UserAccountsApiarchive - */ - accountId: string -} - -export interface UserAccountsApiReplaceRequest { - /** - * The external accounting system user account information. - * @type CreateUserAccountRequestExternal - * @memberof UserAccountsApireplace - */ - createUserAccountRequestExternal: CreateUserAccountRequestExternal -} - -export class ObjectUserAccountsApi { - private api: ObservableUserAccountsApi - - public constructor(configuration: Configuration, requestFactory?: UserAccountsApiRequestFactory, responseProcessor?: UserAccountsApiResponseProcessor) { - this.api = new ObservableUserAccountsApi(configuration, requestFactory, responseProcessor); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param param the request object - */ - public archiveWithHttpInfo(param: UserAccountsApiArchiveRequest, options?: Configuration): Promise> { - return this.api.archiveWithHttpInfo(param.accountId, options).toPromise(); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param param the request object - */ - public archive(param: UserAccountsApiArchiveRequest, options?: Configuration): Promise { - return this.api.archive(param.accountId, options).toPromise(); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param param the request object - */ - public replaceWithHttpInfo(param: UserAccountsApiReplaceRequest, options?: Configuration): Promise> { - return this.api.replaceWithHttpInfo(param.createUserAccountRequestExternal, options).toPromise(); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param param the request object - */ - public replace(param: UserAccountsApiReplaceRequest, options?: Configuration): Promise { - return this.api.replace(param.createUserAccountRequestExternal, options).toPromise(); - } - -} diff --git a/codegen/crm/extensions/accounting/types/ObservableAPI.ts b/codegen/crm/extensions/accounting/types/ObservableAPI.ts deleted file mode 100644 index 2b4f7d6b9..000000000 --- a/codegen/crm/extensions/accounting/types/ObservableAPI.ts +++ /dev/null @@ -1,775 +0,0 @@ -import { ResponseContext, RequestContext, HttpInfo } from '../http/http'; -import { Configuration} from '../configuration' -import { Observable, of, from } from '../rxjsStub'; -import {mergeMap, map} from '../rxjsStub'; -import { AccountingAppSettings } from '../models/AccountingAppSettings'; -import { ActionResponse } from '../models/ActionResponse'; -import { CreateUserAccountRequestExternal } from '../models/CreateUserAccountRequestExternal'; -import { CustomerSearchResponseExternal } from '../models/CustomerSearchResponseExternal'; -import { ExchangeRateResponse } from '../models/ExchangeRateResponse'; -import { InvoiceCreatePaymentRequest } from '../models/InvoiceCreatePaymentRequest'; -import { InvoicePdfResponse } from '../models/InvoicePdfResponse'; -import { InvoiceReadResponse } from '../models/InvoiceReadResponse'; -import { InvoiceSearchResponse } from '../models/InvoiceSearchResponse'; -import { InvoiceUpdateRequest } from '../models/InvoiceUpdateRequest'; -import { InvoiceUpdateResponse } from '../models/InvoiceUpdateResponse'; -import { InvoicesResponseExternal } from '../models/InvoicesResponseExternal'; -import { ProductSearchResponse } from '../models/ProductSearchResponse'; -import { ResultIdAccountingResponse } from '../models/ResultIdAccountingResponse'; -import { SyncContactsRequest } from '../models/SyncContactsRequest'; -import { SyncProductsRequest } from '../models/SyncProductsRequest'; -import { TaxSearchResponse } from '../models/TaxSearchResponse'; -import { TermsResponse } from '../models/TermsResponse'; - -import { CallbacksApiRequestFactory, CallbacksApiResponseProcessor} from "../apis/CallbacksApi"; -export class ObservableCallbacksApi { - private requestFactory: CallbacksApiRequestFactory; - private responseProcessor: CallbacksApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: CallbacksApiRequestFactory, - responseProcessor?: CallbacksApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new CallbacksApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new CallbacksApiResponseProcessor(); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created customer. - */ - public createCustomerWithHttpInfo(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createCustomer(requestId, resultIdAccountingResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCustomerWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created customer. - */ - public createCustomer(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Observable { - return this.createCustomerWithHttpInfo(requestId, resultIdAccountingResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param requestId The ID of the request that this response is for - * @param exchangeRateResponse The result of the exchange rate request. - */ - public createExchangeRateWithHttpInfo(requestId: string, exchangeRateResponse: ExchangeRateResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createExchangeRate(requestId, exchangeRateResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createExchangeRateWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param requestId The ID of the request that this response is for - * @param exchangeRateResponse The result of the exchange rate request. - */ - public createExchangeRate(requestId: string, exchangeRateResponse: ExchangeRateResponse, _options?: Configuration): Observable { - return this.createExchangeRateWithHttpInfo(requestId, exchangeRateResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created invoice. - */ - public createInvoiceWithHttpInfo(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createInvoice(requestId, resultIdAccountingResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createInvoiceWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created invoice. - */ - public createInvoice(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Observable { - return this.createInvoiceWithHttpInfo(requestId, resultIdAccountingResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param requestId The ID of the request that this response is for - * @param termsResponse The result of the terms search - */ - public createTermWithHttpInfo(requestId: string, termsResponse: TermsResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createTerm(requestId, termsResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createTermWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param requestId The ID of the request that this response is for - * @param termsResponse The result of the terms search - */ - public createTerm(requestId: string, termsResponse: TermsResponse, _options?: Configuration): Observable { - return this.createTermWithHttpInfo(requestId, termsResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param requestId The ID of the request that this response is for - * @param customerSearchResponseExternal The result of the customer search request. - */ - public doCustomerSearchWithHttpInfo(requestId: string, customerSearchResponseExternal: CustomerSearchResponseExternal, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.doCustomerSearch(requestId, customerSearchResponseExternal, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doCustomerSearchWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param requestId The ID of the request that this response is for - * @param customerSearchResponseExternal The result of the customer search request. - */ - public doCustomerSearch(requestId: string, customerSearchResponseExternal: CustomerSearchResponseExternal, _options?: Configuration): Observable { - return this.doCustomerSearchWithHttpInfo(requestId, customerSearchResponseExternal, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param requestId The ID of the request that this response is for - * @param invoiceSearchResponse The result of the invoice search request. - */ - public doInvoiceSearchWithHttpInfo(requestId: string, invoiceSearchResponse: InvoiceSearchResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.doInvoiceSearch(requestId, invoiceSearchResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doInvoiceSearchWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param requestId The ID of the request that this response is for - * @param invoiceSearchResponse The result of the invoice search request. - */ - public doInvoiceSearch(requestId: string, invoiceSearchResponse: InvoiceSearchResponse, _options?: Configuration): Observable { - return this.doInvoiceSearchWithHttpInfo(requestId, invoiceSearchResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param requestId The ID of the request that this response is for - * @param productSearchResponse The result of the product search request. - */ - public doProductSearchWithHttpInfo(requestId: string, productSearchResponse: ProductSearchResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.doProductSearch(requestId, productSearchResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doProductSearchWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param requestId The ID of the request that this response is for - * @param productSearchResponse The result of the product search request. - */ - public doProductSearch(requestId: string, productSearchResponse: ProductSearchResponse, _options?: Configuration): Observable { - return this.doProductSearchWithHttpInfo(requestId, productSearchResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param requestId The ID of the request that this response is for - * @param taxSearchResponse The result of the taxes search request. - */ - public doTaxSearchWithHttpInfo(requestId: string, taxSearchResponse: TaxSearchResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.doTaxSearch(requestId, taxSearchResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doTaxSearchWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param requestId The ID of the request that this response is for - * @param taxSearchResponse The result of the taxes search request. - */ - public doTaxSearch(requestId: string, taxSearchResponse: TaxSearchResponse, _options?: Configuration): Observable { - return this.doTaxSearchWithHttpInfo(requestId, taxSearchResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param requestId The ID of the request that this response is for - * @param invoicesResponseExternal The result of the invoice request. - */ - public getByIdWithHttpInfo(requestId: string, invoicesResponseExternal: InvoicesResponseExternal, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getById(requestId, invoicesResponseExternal, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getByIdWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param requestId The ID of the request that this response is for - * @param invoicesResponseExternal The result of the invoice request. - */ - public getById(requestId: string, invoicesResponseExternal: InvoicesResponseExternal, _options?: Configuration): Observable { - return this.getByIdWithHttpInfo(requestId, invoicesResponseExternal, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param requestId The ID of the request that this response is for - * @param invoicePdfResponse The bytes of the invoice PDF. - */ - public invoicePdfWithHttpInfo(requestId: string, invoicePdfResponse: InvoicePdfResponse, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.invoicePdf(requestId, invoicePdfResponse, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.invoicePdfWithHttpInfo(rsp))); - })); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param requestId The ID of the request that this response is for - * @param invoicePdfResponse The bytes of the invoice PDF. - */ - public invoicePdf(requestId: string, invoicePdfResponse: InvoicePdfResponse, _options?: Configuration): Observable { - return this.invoicePdfWithHttpInfo(requestId, invoicePdfResponse, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { InvoiceApiRequestFactory, InvoiceApiResponseProcessor} from "../apis/InvoiceApi"; -export class ObservableInvoiceApi { - private requestFactory: InvoiceApiRequestFactory; - private responseProcessor: InvoiceApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: InvoiceApiRequestFactory, - responseProcessor?: InvoiceApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new InvoiceApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new InvoiceApiResponseProcessor(); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param invoiceCreatePaymentRequest The payment information - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public createPaymentWithHttpInfo(invoiceId: string, invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest, accountId?: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createPayment(invoiceId, invoiceCreatePaymentRequest, accountId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createPaymentWithHttpInfo(rsp))); - })); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param invoiceCreatePaymentRequest The payment information - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public createPayment(invoiceId: string, invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest, accountId?: string, _options?: Configuration): Observable { - return this.createPaymentWithHttpInfo(invoiceId, invoiceCreatePaymentRequest, accountId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public getByIdWithHttpInfo(invoiceId: string, accountId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getById(invoiceId, accountId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getByIdWithHttpInfo(rsp))); - })); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public getById(invoiceId: string, accountId: string, _options?: Configuration): Observable { - return this.getByIdWithHttpInfo(invoiceId, accountId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @param invoiceUpdateRequest The invoice data to update - */ - public updateWithHttpInfo(invoiceId: string, accountId: string, invoiceUpdateRequest: InvoiceUpdateRequest, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.update(invoiceId, accountId, invoiceUpdateRequest, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWithHttpInfo(rsp))); - })); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @param invoiceUpdateRequest The invoice data to update - */ - public update(invoiceId: string, accountId: string, invoiceUpdateRequest: InvoiceUpdateRequest, _options?: Configuration): Observable { - return this.updateWithHttpInfo(invoiceId, accountId, invoiceUpdateRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; -export class ObservableSettingsApi { - private requestFactory: SettingsApiRequestFactory; - private responseProcessor: SettingsApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: SettingsApiRequestFactory, - responseProcessor?: SettingsApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new SettingsApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new SettingsApiResponseProcessor(); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - public getByIdWithHttpInfo(appId: number, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.getById(appId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getByIdWithHttpInfo(rsp))); - })); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - public getById(appId: number, _options?: Configuration): Observable { - return this.getByIdWithHttpInfo(appId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param accountingAppSettings - */ - public replaceWithHttpInfo(appId: number, accountingAppSettings: AccountingAppSettings, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.replace(appId, accountingAppSettings, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceWithHttpInfo(rsp))); - })); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param accountingAppSettings - */ - public replace(appId: number, accountingAppSettings: AccountingAppSettings, _options?: Configuration): Observable { - return this.replaceWithHttpInfo(appId, accountingAppSettings, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { SyncApiRequestFactory, SyncApiResponseProcessor} from "../apis/SyncApi"; -export class ObservableSyncApi { - private requestFactory: SyncApiRequestFactory; - private responseProcessor: SyncApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: SyncApiRequestFactory, - responseProcessor?: SyncApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new SyncApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new SyncApiResponseProcessor(); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncContactsRequest - */ - public createContactWithHttpInfo(appId: number, syncContactsRequest: SyncContactsRequest, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createContact(appId, syncContactsRequest, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createContactWithHttpInfo(rsp))); - })); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncContactsRequest - */ - public createContact(appId: number, syncContactsRequest: SyncContactsRequest, _options?: Configuration): Observable { - return this.createContactWithHttpInfo(appId, syncContactsRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncProductsRequest - */ - public createProductWithHttpInfo(appId: number, syncProductsRequest: SyncProductsRequest, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.createProduct(appId, syncProductsRequest, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createProductWithHttpInfo(rsp))); - })); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncProductsRequest - */ - public createProduct(appId: number, syncProductsRequest: SyncProductsRequest, _options?: Configuration): Observable { - return this.createProductWithHttpInfo(appId, syncProductsRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { UserAccountsApiRequestFactory, UserAccountsApiResponseProcessor} from "../apis/UserAccountsApi"; -export class ObservableUserAccountsApi { - private requestFactory: UserAccountsApiRequestFactory; - private responseProcessor: UserAccountsApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: UserAccountsApiRequestFactory, - responseProcessor?: UserAccountsApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new UserAccountsApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new UserAccountsApiResponseProcessor(); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param accountId The ID of the user account to delete. - */ - public archiveWithHttpInfo(accountId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.archive(accountId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveWithHttpInfo(rsp))); - })); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param accountId The ID of the user account to delete. - */ - public archive(accountId: string, _options?: Configuration): Observable { - return this.archiveWithHttpInfo(accountId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param createUserAccountRequestExternal The external accounting system user account information. - */ - public replaceWithHttpInfo(createUserAccountRequestExternal: CreateUserAccountRequestExternal, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.replace(createUserAccountRequestExternal, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceWithHttpInfo(rsp))); - })); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param createUserAccountRequestExternal The external accounting system user account information. - */ - public replace(createUserAccountRequestExternal: CreateUserAccountRequestExternal, _options?: Configuration): Observable { - return this.replaceWithHttpInfo(createUserAccountRequestExternal, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} diff --git a/codegen/crm/extensions/accounting/types/PromiseAPI.ts b/codegen/crm/extensions/accounting/types/PromiseAPI.ts deleted file mode 100644 index 1128af4e5..000000000 --- a/codegen/crm/extensions/accounting/types/PromiseAPI.ts +++ /dev/null @@ -1,532 +0,0 @@ -import { HttpInfo } from '../http/http'; -import { Configuration} from '../configuration' - -import { AccountingAppSettings } from '../models/AccountingAppSettings'; -import { ActionResponse } from '../models/ActionResponse'; -import { CreateUserAccountRequestExternal } from '../models/CreateUserAccountRequestExternal'; -import { CustomerSearchResponseExternal } from '../models/CustomerSearchResponseExternal'; -import { ExchangeRateResponse } from '../models/ExchangeRateResponse'; -import { InvoiceCreatePaymentRequest } from '../models/InvoiceCreatePaymentRequest'; -import { InvoicePdfResponse } from '../models/InvoicePdfResponse'; -import { InvoiceReadResponse } from '../models/InvoiceReadResponse'; -import { InvoiceSearchResponse } from '../models/InvoiceSearchResponse'; -import { InvoiceUpdateRequest } from '../models/InvoiceUpdateRequest'; -import { InvoiceUpdateResponse } from '../models/InvoiceUpdateResponse'; -import { InvoicesResponseExternal } from '../models/InvoicesResponseExternal'; -import { ProductSearchResponse } from '../models/ProductSearchResponse'; -import { ResultIdAccountingResponse } from '../models/ResultIdAccountingResponse'; -import { SyncContactsRequest } from '../models/SyncContactsRequest'; -import { SyncProductsRequest } from '../models/SyncProductsRequest'; -import { TaxSearchResponse } from '../models/TaxSearchResponse'; -import { TermsResponse } from '../models/TermsResponse'; -import { ObservableCallbacksApi } from './ObservableAPI'; - -import { CallbacksApiRequestFactory, CallbacksApiResponseProcessor} from "../apis/CallbacksApi"; -export class PromiseCallbacksApi { - private api: ObservableCallbacksApi - - public constructor( - configuration: Configuration, - requestFactory?: CallbacksApiRequestFactory, - responseProcessor?: CallbacksApiResponseProcessor - ) { - this.api = new ObservableCallbacksApi(configuration, requestFactory, responseProcessor); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created customer. - */ - public createCustomerWithHttpInfo(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise> { - const result = this.api.createCustomerWithHttpInfo(requestId, resultIdAccountingResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a customer creation request. - * Endpoint for customer creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created customer. - */ - public createCustomer(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise { - const result = this.api.createCustomer(requestId, resultIdAccountingResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param requestId The ID of the request that this response is for - * @param exchangeRateResponse The result of the exchange rate request. - */ - public createExchangeRateWithHttpInfo(requestId: string, exchangeRateResponse: ExchangeRateResponse, _options?: Configuration): Promise> { - const result = this.api.createExchangeRateWithHttpInfo(requestId, exchangeRateResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to an exchange rate request. - * Endpoint for exchange rate response - * @param requestId The ID of the request that this response is for - * @param exchangeRateResponse The result of the exchange rate request. - */ - public createExchangeRate(requestId: string, exchangeRateResponse: ExchangeRateResponse, _options?: Configuration): Promise { - const result = this.api.createExchangeRate(requestId, exchangeRateResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created invoice. - */ - public createInvoiceWithHttpInfo(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise> { - const result = this.api.createInvoiceWithHttpInfo(requestId, resultIdAccountingResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice creation request. - * Endpoint for invoice creation response - * @param requestId The ID of the request that this response is for - * @param resultIdAccountingResponse The ID of the created invoice. - */ - public createInvoice(requestId: string, resultIdAccountingResponse: ResultIdAccountingResponse, _options?: Configuration): Promise { - const result = this.api.createInvoice(requestId, resultIdAccountingResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param requestId The ID of the request that this response is for - * @param termsResponse The result of the terms search - */ - public createTermWithHttpInfo(requestId: string, termsResponse: TermsResponse, _options?: Configuration): Promise> { - const result = this.api.createTermWithHttpInfo(requestId, termsResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a terms search request. - * Endpoint for terms search response - * @param requestId The ID of the request that this response is for - * @param termsResponse The result of the terms search - */ - public createTerm(requestId: string, termsResponse: TermsResponse, _options?: Configuration): Promise { - const result = this.api.createTerm(requestId, termsResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param requestId The ID of the request that this response is for - * @param customerSearchResponseExternal The result of the customer search request. - */ - public doCustomerSearchWithHttpInfo(requestId: string, customerSearchResponseExternal: CustomerSearchResponseExternal, _options?: Configuration): Promise> { - const result = this.api.doCustomerSearchWithHttpInfo(requestId, customerSearchResponseExternal, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a customer search request. - * Endpoint for customer search response - * @param requestId The ID of the request that this response is for - * @param customerSearchResponseExternal The result of the customer search request. - */ - public doCustomerSearch(requestId: string, customerSearchResponseExternal: CustomerSearchResponseExternal, _options?: Configuration): Promise { - const result = this.api.doCustomerSearch(requestId, customerSearchResponseExternal, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param requestId The ID of the request that this response is for - * @param invoiceSearchResponse The result of the invoice search request. - */ - public doInvoiceSearchWithHttpInfo(requestId: string, invoiceSearchResponse: InvoiceSearchResponse, _options?: Configuration): Promise> { - const result = this.api.doInvoiceSearchWithHttpInfo(requestId, invoiceSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice search request. - * Endpoint for invoice search response - * @param requestId The ID of the request that this response is for - * @param invoiceSearchResponse The result of the invoice search request. - */ - public doInvoiceSearch(requestId: string, invoiceSearchResponse: InvoiceSearchResponse, _options?: Configuration): Promise { - const result = this.api.doInvoiceSearch(requestId, invoiceSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param requestId The ID of the request that this response is for - * @param productSearchResponse The result of the product search request. - */ - public doProductSearchWithHttpInfo(requestId: string, productSearchResponse: ProductSearchResponse, _options?: Configuration): Promise> { - const result = this.api.doProductSearchWithHttpInfo(requestId, productSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a product search request. - * Endpoint for product search response - * @param requestId The ID of the request that this response is for - * @param productSearchResponse The result of the product search request. - */ - public doProductSearch(requestId: string, productSearchResponse: ProductSearchResponse, _options?: Configuration): Promise { - const result = this.api.doProductSearch(requestId, productSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param requestId The ID of the request that this response is for - * @param taxSearchResponse The result of the taxes search request. - */ - public doTaxSearchWithHttpInfo(requestId: string, taxSearchResponse: TaxSearchResponse, _options?: Configuration): Promise> { - const result = this.api.doTaxSearchWithHttpInfo(requestId, taxSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a taxes search request. - * Endpoint for taxes search response - * @param requestId The ID of the request that this response is for - * @param taxSearchResponse The result of the taxes search request. - */ - public doTaxSearch(requestId: string, taxSearchResponse: TaxSearchResponse, _options?: Configuration): Promise { - const result = this.api.doTaxSearch(requestId, taxSearchResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param requestId The ID of the request that this response is for - * @param invoicesResponseExternal The result of the invoice request. - */ - public getByIdWithHttpInfo(requestId: string, invoicesResponseExternal: InvoicesResponseExternal, _options?: Configuration): Promise> { - const result = this.api.getByIdWithHttpInfo(requestId, invoicesResponseExternal, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the response to a invoice get-by-id request. - * Endpoint for invoice get-by-id response - * @param requestId The ID of the request that this response is for - * @param invoicesResponseExternal The result of the invoice request. - */ - public getById(requestId: string, invoicesResponseExternal: InvoicesResponseExternal, _options?: Configuration): Promise { - const result = this.api.getById(requestId, invoicesResponseExternal, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param requestId The ID of the request that this response is for - * @param invoicePdfResponse The bytes of the invoice PDF. - */ - public invoicePdfWithHttpInfo(requestId: string, invoicePdfResponse: InvoicePdfResponse, _options?: Configuration): Promise> { - const result = this.api.invoicePdfWithHttpInfo(requestId, invoicePdfResponse, _options); - return result.toPromise(); - } - - /** - * Call this endpoint with the PDF content of a requested invoice. - * Endpoint for PDF content of invoice - * @param requestId The ID of the request that this response is for - * @param invoicePdfResponse The bytes of the invoice PDF. - */ - public invoicePdf(requestId: string, invoicePdfResponse: InvoicePdfResponse, _options?: Configuration): Promise { - const result = this.api.invoicePdf(requestId, invoicePdfResponse, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableInvoiceApi } from './ObservableAPI'; - -import { InvoiceApiRequestFactory, InvoiceApiResponseProcessor} from "../apis/InvoiceApi"; -export class PromiseInvoiceApi { - private api: ObservableInvoiceApi - - public constructor( - configuration: Configuration, - requestFactory?: InvoiceApiRequestFactory, - responseProcessor?: InvoiceApiResponseProcessor - ) { - this.api = new ObservableInvoiceApi(configuration, requestFactory, responseProcessor); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param invoiceCreatePaymentRequest The payment information - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public createPaymentWithHttpInfo(invoiceId: string, invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest, accountId?: string, _options?: Configuration): Promise> { - const result = this.api.createPaymentWithHttpInfo(invoiceId, invoiceCreatePaymentRequest, accountId, _options); - return result.toPromise(); - } - - /** - * Records an payment against an invoice. - * Records an invoice payment - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param invoiceCreatePaymentRequest The payment information - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public createPayment(invoiceId: string, invoiceCreatePaymentRequest: InvoiceCreatePaymentRequest, accountId?: string, _options?: Configuration): Promise { - const result = this.api.createPayment(invoiceId, invoiceCreatePaymentRequest, accountId, _options); - return result.toPromise(); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public getByIdWithHttpInfo(invoiceId: string, accountId: string, _options?: Configuration): Promise> { - const result = this.api.getByIdWithHttpInfo(invoiceId, accountId, _options); - return result.toPromise(); - } - - /** - * Returns invoice data for an Accounting account from the specified ID - * Get invoice data - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - */ - public getById(invoiceId: string, accountId: string, _options?: Configuration): Promise { - const result = this.api.getById(invoiceId, accountId, _options); - return result.toPromise(); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @param invoiceUpdateRequest The invoice data to update - */ - public updateWithHttpInfo(invoiceId: string, accountId: string, invoiceUpdateRequest: InvoiceUpdateRequest, _options?: Configuration): Promise> { - const result = this.api.updateWithHttpInfo(invoiceId, accountId, invoiceUpdateRequest, _options); - return result.toPromise(); - } - - /** - * Updates an Invoice by the given ID. - * Update an invoice - * @param invoiceId The ID of the invoice. This is the invoice ID from the external accounting system. - * @param accountId The ID of the account that the invoice belongs to. This is the account ID from the external accounting system. - * @param invoiceUpdateRequest The invoice data to update - */ - public update(invoiceId: string, accountId: string, invoiceUpdateRequest: InvoiceUpdateRequest, _options?: Configuration): Promise { - const result = this.api.update(invoiceId, accountId, invoiceUpdateRequest, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableSettingsApi } from './ObservableAPI'; - -import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; -export class PromiseSettingsApi { - private api: ObservableSettingsApi - - public constructor( - configuration: Configuration, - requestFactory?: SettingsApiRequestFactory, - responseProcessor?: SettingsApiResponseProcessor - ) { - this.api = new ObservableSettingsApi(configuration, requestFactory, responseProcessor); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - public getByIdWithHttpInfo(appId: number, _options?: Configuration): Promise> { - const result = this.api.getByIdWithHttpInfo(appId, _options); - return result.toPromise(); - } - - /** - * Returns the URL settings for an accounting app with the specified ID. - * Get URL settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - */ - public getById(appId: number, _options?: Configuration): Promise { - const result = this.api.getById(appId, _options); - return result.toPromise(); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param accountingAppSettings - */ - public replaceWithHttpInfo(appId: number, accountingAppSettings: AccountingAppSettings, _options?: Configuration): Promise> { - const result = this.api.replaceWithHttpInfo(appId, accountingAppSettings, _options); - return result.toPromise(); - } - - /** - * Add/Update the URL settings for an accounting app with the specified ID. All URLs must use the `https` protocol. - * Add/Update URL Settings - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param accountingAppSettings - */ - public replace(appId: number, accountingAppSettings: AccountingAppSettings, _options?: Configuration): Promise { - const result = this.api.replace(appId, accountingAppSettings, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableSyncApi } from './ObservableAPI'; - -import { SyncApiRequestFactory, SyncApiResponseProcessor} from "../apis/SyncApi"; -export class PromiseSyncApi { - private api: ObservableSyncApi - - public constructor( - configuration: Configuration, - requestFactory?: SyncApiRequestFactory, - responseProcessor?: SyncApiResponseProcessor - ) { - this.api = new ObservableSyncApi(configuration, requestFactory, responseProcessor); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncContactsRequest - */ - public createContactWithHttpInfo(appId: number, syncContactsRequest: SyncContactsRequest, _options?: Configuration): Promise> { - const result = this.api.createContactWithHttpInfo(appId, syncContactsRequest, _options); - return result.toPromise(); - } - - /** - * Imports contacts\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import contacts - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncContactsRequest - */ - public createContact(appId: number, syncContactsRequest: SyncContactsRequest, _options?: Configuration): Promise { - const result = this.api.createContact(appId, syncContactsRequest, _options); - return result.toPromise(); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncProductsRequest - */ - public createProductWithHttpInfo(appId: number, syncProductsRequest: SyncProductsRequest, _options?: Configuration): Promise> { - const result = this.api.createProductWithHttpInfo(appId, syncProductsRequest, _options); - return result.toPromise(); - } - - /** - * Imports products\' properties from an external accounting system to HubSpot. Import details, including property mappings, must be configured previously in HubSpot infrastructure. - * Import products - * @param appId The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal. - * @param syncProductsRequest - */ - public createProduct(appId: number, syncProductsRequest: SyncProductsRequest, _options?: Configuration): Promise { - const result = this.api.createProduct(appId, syncProductsRequest, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableUserAccountsApi } from './ObservableAPI'; - -import { UserAccountsApiRequestFactory, UserAccountsApiResponseProcessor} from "../apis/UserAccountsApi"; -export class PromiseUserAccountsApi { - private api: ObservableUserAccountsApi - - public constructor( - configuration: Configuration, - requestFactory?: UserAccountsApiRequestFactory, - responseProcessor?: UserAccountsApiResponseProcessor - ) { - this.api = new ObservableUserAccountsApi(configuration, requestFactory, responseProcessor); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param accountId The ID of the user account to delete. - */ - public archiveWithHttpInfo(accountId: string, _options?: Configuration): Promise> { - const result = this.api.archiveWithHttpInfo(accountId, _options); - return result.toPromise(); - } - - /** - * Deletes a user account from HubSpot, meaning that HubSpot will no longer send requests to the external accounting system for this user. - * Delete user account - * @param accountId The ID of the user account to delete. - */ - public archive(accountId: string, _options?: Configuration): Promise { - const result = this.api.archive(accountId, _options); - return result.toPromise(); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param createUserAccountRequestExternal The external accounting system user account information. - */ - public replaceWithHttpInfo(createUserAccountRequestExternal: CreateUserAccountRequestExternal, _options?: Configuration): Promise> { - const result = this.api.replaceWithHttpInfo(createUserAccountRequestExternal, _options); - return result.toPromise(); - } - - /** - * Creates an account which contains the information about the account in the external accounting system. This *must* be called after a user connects their HubSpot account to the external accounting system, as there is no other way for HubSpot to obtain the external account details. - * Create a user account - * @param createUserAccountRequestExternal The external accounting system user account information. - */ - public replace(createUserAccountRequestExternal: CreateUserAccountRequestExternal, _options?: Configuration): Promise { - const result = this.api.replace(createUserAccountRequestExternal, _options); - return result.toPromise(); - } - - -} - - - diff --git a/codegen/crm/extensions/accounting/util.ts b/codegen/crm/extensions/accounting/util.ts deleted file mode 100644 index 96ea3dfdc..000000000 --- a/codegen/crm/extensions/accounting/util.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits - * and "X" (the letter X) with a length of 3 - * - * @param codeRange string with length 3 consisting of digits and "X" (the letter X) - * @param code the http status code to be checked against the code range - */ -export function isCodeInRange(codeRange: string, code: number): boolean { - // This is how the default value is encoded in OAG - if (codeRange === "0") { - return true; - } - if (codeRange == code.toString()) { - return true; - } else { - const codeString = code.toString(); - if (codeString.length != codeRange.length) { - return false; - } - for (let i = 0; i < codeString.length; i++) { - if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { - return false; - } - } - return true; - } -} - -/** -* Returns if it can consume form -* -* @param consumes array -*/ -export function canConsumeForm(contentTypes: string[]): boolean { - return contentTypes.indexOf('multipart/form-data') !== -1 -} diff --git a/codegen/crm/extensions/calling/apis/RecordingSettingsApi.ts b/codegen/crm/extensions/calling/apis/RecordingSettingsApi.ts index 60f01cd7b..d5b4c77d6 100644 --- a/codegen/crm/extensions/calling/apis/RecordingSettingsApi.ts +++ b/codegen/crm/extensions/calling/apis/RecordingSettingsApi.ts @@ -8,6 +8,7 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { MarkRecordingAsReadyRequest } from '../models/MarkRecordingAsReadyRequest'; import { RecordingSettingsPatchRequest } from '../models/RecordingSettingsPatchRequest'; import { RecordingSettingsRequest } from '../models/RecordingSettingsRequest'; import { RecordingSettingsResponse } from '../models/RecordingSettingsResponse'; @@ -18,7 +19,9 @@ import { RecordingSettingsResponse } from '../models/RecordingSettingsResponse'; export class RecordingSettingsApiRequestFactory extends BaseAPIRequestFactory { /** - * @param appId + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings + * @param appId The ID of the app. */ public async getUrlFormat(appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -54,7 +57,57 @@ export class RecordingSettingsApiRequestFactory extends BaseAPIRequestFactory { } /** - * @param appId + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param markRecordingAsReadyRequest + */ + public async markAsReady(markRecordingAsReadyRequest: MarkRecordingAsReadyRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'markRecordingAsReadyRequest' is not null or undefined + if (markRecordingAsReadyRequest === null || markRecordingAsReadyRequest === undefined) { + throw new RequiredError("RecordingSettingsApi", "markAsReady", "markRecordingAsReadyRequest"); + } + + + // Path Params + const localVarPath = '/crm/v3/extensions/calling/recordings/ready'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(markRecordingAsReadyRequest, "MarkRecordingAsReadyRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording + * @param appId The ID of the app. * @param recordingSettingsRequest */ public async registerUrlFormat(appId: number, recordingSettingsRequest: RecordingSettingsRequest, _options?: Configuration): Promise { @@ -108,7 +161,9 @@ export class RecordingSettingsApiRequestFactory extends BaseAPIRequestFactory { } /** - * @param appId + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings + * @param appId The ID of the app. * @param recordingSettingsPatchRequest */ public async updateUrlFormat(appId: number, recordingSettingsPatchRequest: RecordingSettingsPatchRequest, _options?: Configuration): Promise { @@ -201,6 +256,38 @@ export class RecordingSettingsApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to markAsReady + * @throws ApiException if the response code was not in [200, 299] + */ + public async markAsReadyWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/codegen/crm/extensions/calling/apis/SettingsApi.ts b/codegen/crm/extensions/calling/apis/SettingsApi.ts index 469024c0f..1aa163171 100644 --- a/codegen/crm/extensions/calling/apis/SettingsApi.ts +++ b/codegen/crm/extensions/calling/apis/SettingsApi.ts @@ -20,7 +20,7 @@ export class SettingsApiRequestFactory extends BaseAPIRequestFactory { /** * Deletes this calling extension. This will remove your service as an option for all connected accounts. * Delete calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public async archive(appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -58,8 +58,8 @@ export class SettingsApiRequestFactory extends BaseAPIRequestFactory { /** * Used to set the menu label, target iframe URL, and dimensions for your calling extension. * Configure a calling extension - * @param appId The ID of the target app. - * @param settingsRequest Settings state to create with. + * @param appId The ID of the app. + * @param settingsRequest */ public async create(appId: number, settingsRequest: SettingsRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -114,7 +114,7 @@ export class SettingsApiRequestFactory extends BaseAPIRequestFactory { /** * Returns the calling extension settings configured for your app. * Get calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public async getById(appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -152,8 +152,8 @@ export class SettingsApiRequestFactory extends BaseAPIRequestFactory { /** * Updates existing calling extension settings. * Update settings - * @param appId The ID of the target app. - * @param settingsPatchRequest Updated details for the settings. + * @param appId The ID of the app. + * @param settingsPatchRequest */ public async update(appId: number, settingsPatchRequest: SettingsPatchRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/extensions/calling/auth/auth.ts b/codegen/crm/extensions/calling/auth/auth.ts index 61a35d93e..484c72ac6 100644 --- a/codegen/crm/extensions/calling/auth/auth.ts +++ b/codegen/crm/extensions/calling/auth/auth.ts @@ -41,10 +41,31 @@ export class DeveloperHapikeyAuthentication implements SecurityAuthentication { } } +/** + * Applies oauth2 authentication to the request context. + */ +export class Oauth2Authentication implements SecurityAuthentication { + /** + * Configures OAuth2 with the necessary properties + * + * @param accessToken: The access token to be used for every request + */ + public constructor(private accessToken: string) {} + + public getName(): string { + return "oauth2"; + } + + public applySecurityAuthentication(context: RequestContext) { + context.setHeaderParam("Authorization", "Bearer " + this.accessToken); + } +} + export type AuthMethods = { "default"?: SecurityAuthentication, - "developer_hapikey"?: SecurityAuthentication + "developer_hapikey"?: SecurityAuthentication, + "oauth2"?: SecurityAuthentication } export type ApiKeyConfiguration = string; @@ -54,7 +75,8 @@ export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { "default"?: SecurityAuthentication, - "developer_hapikey"?: ApiKeyConfiguration + "developer_hapikey"?: ApiKeyConfiguration, + "oauth2"?: OAuth2Configuration } /** @@ -75,5 +97,11 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine ); } + if (config["oauth2"]) { + authMethods["oauth2"] = new Oauth2Authentication( + config["oauth2"]["accessToken"] + ); + } + return authMethods; } \ No newline at end of file diff --git a/codegen/crm/extensions/calling/models/ErrorDetail.ts b/codegen/crm/extensions/calling/models/ErrorDetail.ts index abe66393a..a54e5d0c0 100644 --- a/codegen/crm/extensions/calling/models/ErrorDetail.ts +++ b/codegen/crm/extensions/calling/models/ErrorDetail.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/extensions/calling/models/MarkRecordingAsReadyRequest.ts b/codegen/crm/extensions/calling/models/MarkRecordingAsReadyRequest.ts new file mode 100644 index 000000000..a6bab1d3b --- /dev/null +++ b/codegen/crm/extensions/calling/models/MarkRecordingAsReadyRequest.ts @@ -0,0 +1,34 @@ +/** + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class MarkRecordingAsReadyRequest { + 'engagementId': number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "engagementId", + "baseName": "engagementId", + "type": "number", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return MarkRecordingAsReadyRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/extensions/calling/models/ModelError.ts b/codegen/crm/extensions/calling/models/ModelError.ts index 5cce0849a..d3309569e 100644 --- a/codegen/crm/extensions/calling/models/ModelError.ts +++ b/codegen/crm/extensions/calling/models/ModelError.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/extensions/calling/models/ObjectSerializer.ts b/codegen/crm/extensions/calling/models/ObjectSerializer.ts index cc47697bf..1f773326d 100644 --- a/codegen/crm/extensions/calling/models/ObjectSerializer.ts +++ b/codegen/crm/extensions/calling/models/ObjectSerializer.ts @@ -1,4 +1,5 @@ export * from '../models/ErrorDetail'; +export * from '../models/MarkRecordingAsReadyRequest'; export * from '../models/ModelError'; export * from '../models/RecordingSettingsPatchRequest'; export * from '../models/RecordingSettingsRequest'; @@ -8,6 +9,7 @@ export * from '../models/SettingsRequest'; export * from '../models/SettingsResponse'; import { ErrorDetail } from '../models/ErrorDetail'; +import { MarkRecordingAsReadyRequest } from '../models/MarkRecordingAsReadyRequest'; import { ModelError } from '../models/ModelError'; import { RecordingSettingsPatchRequest } from '../models/RecordingSettingsPatchRequest'; import { RecordingSettingsRequest } from '../models/RecordingSettingsRequest'; @@ -33,6 +35,7 @@ let enumsMap: Set = new Set([ let typeMap: {[index: string]: any} = { "ErrorDetail": ErrorDetail, + "MarkRecordingAsReadyRequest": MarkRecordingAsReadyRequest, "ModelError": ModelError, "RecordingSettingsPatchRequest": RecordingSettingsPatchRequest, "RecordingSettingsRequest": RecordingSettingsRequest, diff --git a/codegen/crm/extensions/calling/models/RecordingSettingsPatchRequest.ts b/codegen/crm/extensions/calling/models/RecordingSettingsPatchRequest.ts index a83ff93bf..01c078eb4 100644 --- a/codegen/crm/extensions/calling/models/RecordingSettingsPatchRequest.ts +++ b/codegen/crm/extensions/calling/models/RecordingSettingsPatchRequest.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/extensions/calling/models/RecordingSettingsRequest.ts b/codegen/crm/extensions/calling/models/RecordingSettingsRequest.ts index 508aee6f6..d4d14f3b6 100644 --- a/codegen/crm/extensions/calling/models/RecordingSettingsRequest.ts +++ b/codegen/crm/extensions/calling/models/RecordingSettingsRequest.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/extensions/calling/models/RecordingSettingsResponse.ts b/codegen/crm/extensions/calling/models/RecordingSettingsResponse.ts index 1454efa3a..a8b1acf6b 100644 --- a/codegen/crm/extensions/calling/models/RecordingSettingsResponse.ts +++ b/codegen/crm/extensions/calling/models/RecordingSettingsResponse.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * diff --git a/codegen/crm/extensions/calling/models/SettingsPatchRequest.ts b/codegen/crm/extensions/calling/models/SettingsPatchRequest.ts index f630b93cd..e089e1bc8 100644 --- a/codegen/crm/extensions/calling/models/SettingsPatchRequest.ts +++ b/codegen/crm/extensions/calling/models/SettingsPatchRequest.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* Settings update request -*/ export class SettingsPatchRequest { /** * When true, you are indicating that your service is compatible with engagement v2 service and can be used with custom objects. @@ -31,6 +28,7 @@ export class SettingsPatchRequest { * The target width of the iframe that will contain your phone/calling UI. */ 'width'?: number; + 'supportsInboundCalling'?: boolean; /** * The URL to your phone/calling UI, built with the [Calling SDK](#). */ @@ -67,6 +65,12 @@ export class SettingsPatchRequest { "type": "number", "format": "int32" }, + { + "name": "supportsInboundCalling", + "baseName": "supportsInboundCalling", + "type": "boolean", + "format": "" + }, { "name": "url", "baseName": "url", diff --git a/codegen/crm/extensions/calling/models/SettingsRequest.ts b/codegen/crm/extensions/calling/models/SettingsRequest.ts index d32d9f7a5..548aee667 100644 --- a/codegen/crm/extensions/calling/models/SettingsRequest.ts +++ b/codegen/crm/extensions/calling/models/SettingsRequest.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* Settings create request -*/ export class SettingsRequest { /** * When true, you are indicating that your service is compatible with engagement v2 service and can be used with custom objects. @@ -31,6 +28,7 @@ export class SettingsRequest { * The target width of the iframe that will contain your phone/calling UI. */ 'width'?: number; + 'supportsInboundCalling': boolean; /** * The URL to your phone/calling UI, built with the [Calling SDK](#). */ @@ -67,6 +65,12 @@ export class SettingsRequest { "type": "number", "format": "int32" }, + { + "name": "supportsInboundCalling", + "baseName": "supportsInboundCalling", + "type": "boolean", + "format": "" + }, { "name": "url", "baseName": "url", diff --git a/codegen/crm/extensions/calling/models/SettingsResponse.ts b/codegen/crm/extensions/calling/models/SettingsResponse.ts index 3fb70c5bb..c2b2ad382 100644 --- a/codegen/crm/extensions/calling/models/SettingsResponse.ts +++ b/codegen/crm/extensions/calling/models/SettingsResponse.ts @@ -1,6 +1,6 @@ /** - * Calling Extensions - * Provides a way for apps to add custom calling options to a contact record. This works in conjunction with the [Calling SDK](#), which is used to build your phone/calling UI. The endpoints here allow your service to appear as an option to HubSpot users when they access the *Call* action on a contact record. Once accessed, your custom phone/calling UI will be displayed in an iframe at the specified URL with the specified dimensions on that record. + * CRM Calling Extensions + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 * @@ -11,9 +11,6 @@ */ -/** -* Current settings state -*/ export class SettingsResponse { /** * When this calling extension was created. @@ -35,6 +32,7 @@ export class SettingsResponse { * The target width of the iframe that will contain your phone/calling UI. */ 'width': number; + 'supportsInboundCalling': boolean; /** * The URL to your phone/calling UI, built with the [Calling SDK](#). */ @@ -81,6 +79,12 @@ export class SettingsResponse { "type": "number", "format": "int32" }, + { + "name": "supportsInboundCalling", + "baseName": "supportsInboundCalling", + "type": "boolean", + "format": "" + }, { "name": "url", "baseName": "url", diff --git a/codegen/crm/extensions/calling/models/all.ts b/codegen/crm/extensions/calling/models/all.ts index f9e7d30e7..f2be7e59b 100644 --- a/codegen/crm/extensions/calling/models/all.ts +++ b/codegen/crm/extensions/calling/models/all.ts @@ -1,4 +1,5 @@ export * from '../models/ErrorDetail' +export * from '../models/MarkRecordingAsReadyRequest' export * from '../models/ModelError' export * from '../models/RecordingSettingsPatchRequest' export * from '../models/RecordingSettingsRequest' diff --git a/codegen/crm/extensions/calling/types/ObjectParamAPI.ts b/codegen/crm/extensions/calling/types/ObjectParamAPI.ts index bd54d3bea..d4aab7140 100644 --- a/codegen/crm/extensions/calling/types/ObjectParamAPI.ts +++ b/codegen/crm/extensions/calling/types/ObjectParamAPI.ts @@ -1,6 +1,7 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' +import { MarkRecordingAsReadyRequest } from '../models/MarkRecordingAsReadyRequest'; import { RecordingSettingsPatchRequest } from '../models/RecordingSettingsPatchRequest'; import { RecordingSettingsRequest } from '../models/RecordingSettingsRequest'; import { RecordingSettingsResponse } from '../models/RecordingSettingsResponse'; @@ -13,16 +14,25 @@ import { RecordingSettingsApiRequestFactory, RecordingSettingsApiResponseProcess export interface RecordingSettingsApiGetUrlFormatRequest { /** - * + * The ID of the app. * @type number * @memberof RecordingSettingsApigetUrlFormat */ appId: number } -export interface RecordingSettingsApiRegisterUrlFormatRequest { +export interface RecordingSettingsApiMarkAsReadyRequest { /** * + * @type MarkRecordingAsReadyRequest + * @memberof RecordingSettingsApimarkAsReady + */ + markRecordingAsReadyRequest: MarkRecordingAsReadyRequest +} + +export interface RecordingSettingsApiRegisterUrlFormatRequest { + /** + * The ID of the app. * @type number * @memberof RecordingSettingsApiregisterUrlFormat */ @@ -37,7 +47,7 @@ export interface RecordingSettingsApiRegisterUrlFormatRequest { export interface RecordingSettingsApiUpdateUrlFormatRequest { /** - * + * The ID of the app. * @type number * @memberof RecordingSettingsApiupdateUrlFormat */ @@ -58,6 +68,8 @@ export class ObjectRecordingSettingsApi { } /** + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings * @param param the request object */ public getUrlFormatWithHttpInfo(param: RecordingSettingsApiGetUrlFormatRequest, options?: Configuration): Promise> { @@ -65,6 +77,8 @@ export class ObjectRecordingSettingsApi { } /** + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings * @param param the request object */ public getUrlFormat(param: RecordingSettingsApiGetUrlFormatRequest, options?: Configuration): Promise { @@ -72,6 +86,26 @@ export class ObjectRecordingSettingsApi { } /** + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param param the request object + */ + public markAsReadyWithHttpInfo(param: RecordingSettingsApiMarkAsReadyRequest, options?: Configuration): Promise> { + return this.api.markAsReadyWithHttpInfo(param.markRecordingAsReadyRequest, options).toPromise(); + } + + /** + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param param the request object + */ + public markAsReady(param: RecordingSettingsApiMarkAsReadyRequest, options?: Configuration): Promise { + return this.api.markAsReady(param.markRecordingAsReadyRequest, options).toPromise(); + } + + /** + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording * @param param the request object */ public registerUrlFormatWithHttpInfo(param: RecordingSettingsApiRegisterUrlFormatRequest, options?: Configuration): Promise> { @@ -79,6 +113,8 @@ export class ObjectRecordingSettingsApi { } /** + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording * @param param the request object */ public registerUrlFormat(param: RecordingSettingsApiRegisterUrlFormatRequest, options?: Configuration): Promise { @@ -86,6 +122,8 @@ export class ObjectRecordingSettingsApi { } /** + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings * @param param the request object */ public updateUrlFormatWithHttpInfo(param: RecordingSettingsApiUpdateUrlFormatRequest, options?: Configuration): Promise> { @@ -93,6 +131,8 @@ export class ObjectRecordingSettingsApi { } /** + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings * @param param the request object */ public updateUrlFormat(param: RecordingSettingsApiUpdateUrlFormatRequest, options?: Configuration): Promise { @@ -106,7 +146,7 @@ import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/ export interface SettingsApiArchiveRequest { /** - * The ID of the target app. + * The ID of the app. * @type number * @memberof SettingsApiarchive */ @@ -115,13 +155,13 @@ export interface SettingsApiArchiveRequest { export interface SettingsApiCreateRequest { /** - * The ID of the target app. + * The ID of the app. * @type number * @memberof SettingsApicreate */ appId: number /** - * Settings state to create with. + * * @type SettingsRequest * @memberof SettingsApicreate */ @@ -130,7 +170,7 @@ export interface SettingsApiCreateRequest { export interface SettingsApiGetByIdRequest { /** - * The ID of the target app. + * The ID of the app. * @type number * @memberof SettingsApigetById */ @@ -139,13 +179,13 @@ export interface SettingsApiGetByIdRequest { export interface SettingsApiUpdateRequest { /** - * The ID of the target app. + * The ID of the app. * @type number * @memberof SettingsApiupdate */ appId: number /** - * Updated details for the settings. + * * @type SettingsPatchRequest * @memberof SettingsApiupdate */ diff --git a/codegen/crm/extensions/calling/types/ObservableAPI.ts b/codegen/crm/extensions/calling/types/ObservableAPI.ts index c9a749370..815d8da3a 100644 --- a/codegen/crm/extensions/calling/types/ObservableAPI.ts +++ b/codegen/crm/extensions/calling/types/ObservableAPI.ts @@ -2,6 +2,7 @@ import { ResponseContext, RequestContext, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; +import { MarkRecordingAsReadyRequest } from '../models/MarkRecordingAsReadyRequest'; import { RecordingSettingsPatchRequest } from '../models/RecordingSettingsPatchRequest'; import { RecordingSettingsRequest } from '../models/RecordingSettingsRequest'; import { RecordingSettingsResponse } from '../models/RecordingSettingsResponse'; @@ -26,7 +27,9 @@ export class ObservableRecordingSettingsApi { } /** - * @param appId + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings + * @param appId The ID of the app. */ public getUrlFormatWithHttpInfo(appId: number, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getUrlFormat(appId, _options); @@ -48,14 +51,51 @@ export class ObservableRecordingSettingsApi { } /** - * @param appId + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings + * @param appId The ID of the app. */ public getUrlFormat(appId: number, _options?: Configuration): Observable { return this.getUrlFormatWithHttpInfo(appId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } /** - * @param appId + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param markRecordingAsReadyRequest + */ + public markAsReadyWithHttpInfo(markRecordingAsReadyRequest: MarkRecordingAsReadyRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.markAsReady(markRecordingAsReadyRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.markAsReadyWithHttpInfo(rsp))); + })); + } + + /** + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param markRecordingAsReadyRequest + */ + public markAsReady(markRecordingAsReadyRequest: MarkRecordingAsReadyRequest, _options?: Configuration): Observable { + return this.markAsReadyWithHttpInfo(markRecordingAsReadyRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording + * @param appId The ID of the app. * @param recordingSettingsRequest */ public registerUrlFormatWithHttpInfo(appId: number, recordingSettingsRequest: RecordingSettingsRequest, _options?: Configuration): Observable> { @@ -78,7 +118,9 @@ export class ObservableRecordingSettingsApi { } /** - * @param appId + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording + * @param appId The ID of the app. * @param recordingSettingsRequest */ public registerUrlFormat(appId: number, recordingSettingsRequest: RecordingSettingsRequest, _options?: Configuration): Observable { @@ -86,7 +128,9 @@ export class ObservableRecordingSettingsApi { } /** - * @param appId + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings + * @param appId The ID of the app. * @param recordingSettingsPatchRequest */ public updateUrlFormatWithHttpInfo(appId: number, recordingSettingsPatchRequest: RecordingSettingsPatchRequest, _options?: Configuration): Observable> { @@ -109,7 +153,9 @@ export class ObservableRecordingSettingsApi { } /** - * @param appId + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings + * @param appId The ID of the app. * @param recordingSettingsPatchRequest */ public updateUrlFormat(appId: number, recordingSettingsPatchRequest: RecordingSettingsPatchRequest, _options?: Configuration): Observable { @@ -137,7 +183,7 @@ export class ObservableSettingsApi { /** * Deletes this calling extension. This will remove your service as an option for all connected accounts. * Delete calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public archiveWithHttpInfo(appId: number, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.archive(appId, _options); @@ -161,7 +207,7 @@ export class ObservableSettingsApi { /** * Deletes this calling extension. This will remove your service as an option for all connected accounts. * Delete calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public archive(appId: number, _options?: Configuration): Observable { return this.archiveWithHttpInfo(appId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -170,8 +216,8 @@ export class ObservableSettingsApi { /** * Used to set the menu label, target iframe URL, and dimensions for your calling extension. * Configure a calling extension - * @param appId The ID of the target app. - * @param settingsRequest Settings state to create with. + * @param appId The ID of the app. + * @param settingsRequest */ public createWithHttpInfo(appId: number, settingsRequest: SettingsRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.create(appId, settingsRequest, _options); @@ -195,8 +241,8 @@ export class ObservableSettingsApi { /** * Used to set the menu label, target iframe URL, and dimensions for your calling extension. * Configure a calling extension - * @param appId The ID of the target app. - * @param settingsRequest Settings state to create with. + * @param appId The ID of the app. + * @param settingsRequest */ public create(appId: number, settingsRequest: SettingsRequest, _options?: Configuration): Observable { return this.createWithHttpInfo(appId, settingsRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -205,7 +251,7 @@ export class ObservableSettingsApi { /** * Returns the calling extension settings configured for your app. * Get calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public getByIdWithHttpInfo(appId: number, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(appId, _options); @@ -229,7 +275,7 @@ export class ObservableSettingsApi { /** * Returns the calling extension settings configured for your app. * Get calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public getById(appId: number, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(appId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -238,8 +284,8 @@ export class ObservableSettingsApi { /** * Updates existing calling extension settings. * Update settings - * @param appId The ID of the target app. - * @param settingsPatchRequest Updated details for the settings. + * @param appId The ID of the app. + * @param settingsPatchRequest */ public updateWithHttpInfo(appId: number, settingsPatchRequest: SettingsPatchRequest, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(appId, settingsPatchRequest, _options); @@ -263,8 +309,8 @@ export class ObservableSettingsApi { /** * Updates existing calling extension settings. * Update settings - * @param appId The ID of the target app. - * @param settingsPatchRequest Updated details for the settings. + * @param appId The ID of the app. + * @param settingsPatchRequest */ public update(appId: number, settingsPatchRequest: SettingsPatchRequest, _options?: Configuration): Observable { return this.updateWithHttpInfo(appId, settingsPatchRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); diff --git a/codegen/crm/extensions/calling/types/PromiseAPI.ts b/codegen/crm/extensions/calling/types/PromiseAPI.ts index b8c390944..594014271 100644 --- a/codegen/crm/extensions/calling/types/PromiseAPI.ts +++ b/codegen/crm/extensions/calling/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' +import { MarkRecordingAsReadyRequest } from '../models/MarkRecordingAsReadyRequest'; import { RecordingSettingsPatchRequest } from '../models/RecordingSettingsPatchRequest'; import { RecordingSettingsRequest } from '../models/RecordingSettingsRequest'; import { RecordingSettingsResponse } from '../models/RecordingSettingsResponse'; @@ -22,7 +23,9 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings + * @param appId The ID of the app. */ public getUrlFormatWithHttpInfo(appId: number, _options?: Configuration): Promise> { const result = this.api.getUrlFormatWithHttpInfo(appId, _options); @@ -30,7 +33,9 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Retrieve the recording endpoint configured for a calling extension app. + * Read calling app recording settings + * @param appId The ID of the app. */ public getUrlFormat(appId: number, _options?: Configuration): Promise { const result = this.api.getUrlFormat(appId, _options); @@ -38,7 +43,29 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param markRecordingAsReadyRequest + */ + public markAsReadyWithHttpInfo(markRecordingAsReadyRequest: MarkRecordingAsReadyRequest, _options?: Configuration): Promise> { + const result = this.api.markAsReadyWithHttpInfo(markRecordingAsReadyRequest, _options); + return result.toPromise(); + } + + /** + * Mark a call recording as ready for transcription, specifying the call by its ID (`engagementid`). + * Mark recording as ready for transcription + * @param markRecordingAsReadyRequest + */ + public markAsReady(markRecordingAsReadyRequest: MarkRecordingAsReadyRequest, _options?: Configuration): Promise { + const result = this.api.markAsReady(markRecordingAsReadyRequest, _options); + return result.toPromise(); + } + + /** + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording + * @param appId The ID of the app. * @param recordingSettingsRequest */ public registerUrlFormatWithHttpInfo(appId: number, recordingSettingsRequest: RecordingSettingsRequest, _options?: Configuration): Promise> { @@ -47,7 +74,9 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Configure a calling extension app with an external URL that HubSpot will use to retrieve call recordings. + * Register calling app for recording + * @param appId The ID of the app. * @param recordingSettingsRequest */ public registerUrlFormat(appId: number, recordingSettingsRequest: RecordingSettingsRequest, _options?: Configuration): Promise { @@ -56,7 +85,9 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings + * @param appId The ID of the app. * @param recordingSettingsPatchRequest */ public updateUrlFormatWithHttpInfo(appId: number, recordingSettingsPatchRequest: RecordingSettingsPatchRequest, _options?: Configuration): Promise> { @@ -65,7 +96,9 @@ export class PromiseRecordingSettingsApi { } /** - * @param appId + * Update the URL that HubSpot will use to retrieve call recordings for a calling extension app. + * Update calling app\'s recording settings + * @param appId The ID of the app. * @param recordingSettingsPatchRequest */ public updateUrlFormat(appId: number, recordingSettingsPatchRequest: RecordingSettingsPatchRequest, _options?: Configuration): Promise { @@ -95,7 +128,7 @@ export class PromiseSettingsApi { /** * Deletes this calling extension. This will remove your service as an option for all connected accounts. * Delete calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public archiveWithHttpInfo(appId: number, _options?: Configuration): Promise> { const result = this.api.archiveWithHttpInfo(appId, _options); @@ -105,7 +138,7 @@ export class PromiseSettingsApi { /** * Deletes this calling extension. This will remove your service as an option for all connected accounts. * Delete calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public archive(appId: number, _options?: Configuration): Promise { const result = this.api.archive(appId, _options); @@ -115,8 +148,8 @@ export class PromiseSettingsApi { /** * Used to set the menu label, target iframe URL, and dimensions for your calling extension. * Configure a calling extension - * @param appId The ID of the target app. - * @param settingsRequest Settings state to create with. + * @param appId The ID of the app. + * @param settingsRequest */ public createWithHttpInfo(appId: number, settingsRequest: SettingsRequest, _options?: Configuration): Promise> { const result = this.api.createWithHttpInfo(appId, settingsRequest, _options); @@ -126,8 +159,8 @@ export class PromiseSettingsApi { /** * Used to set the menu label, target iframe URL, and dimensions for your calling extension. * Configure a calling extension - * @param appId The ID of the target app. - * @param settingsRequest Settings state to create with. + * @param appId The ID of the app. + * @param settingsRequest */ public create(appId: number, settingsRequest: SettingsRequest, _options?: Configuration): Promise { const result = this.api.create(appId, settingsRequest, _options); @@ -137,7 +170,7 @@ export class PromiseSettingsApi { /** * Returns the calling extension settings configured for your app. * Get calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public getByIdWithHttpInfo(appId: number, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(appId, _options); @@ -147,7 +180,7 @@ export class PromiseSettingsApi { /** * Returns the calling extension settings configured for your app. * Get calling settings - * @param appId The ID of the target app. + * @param appId The ID of the app. */ public getById(appId: number, _options?: Configuration): Promise { const result = this.api.getById(appId, _options); @@ -157,8 +190,8 @@ export class PromiseSettingsApi { /** * Updates existing calling extension settings. * Update settings - * @param appId The ID of the target app. - * @param settingsPatchRequest Updated details for the settings. + * @param appId The ID of the app. + * @param settingsPatchRequest */ public updateWithHttpInfo(appId: number, settingsPatchRequest: SettingsPatchRequest, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(appId, settingsPatchRequest, _options); @@ -168,8 +201,8 @@ export class PromiseSettingsApi { /** * Updates existing calling extension settings. * Update settings - * @param appId The ID of the target app. - * @param settingsPatchRequest Updated details for the settings. + * @param appId The ID of the app. + * @param settingsPatchRequest */ public update(appId: number, settingsPatchRequest: SettingsPatchRequest, _options?: Configuration): Promise { const result = this.api.update(appId, settingsPatchRequest, _options); diff --git a/codegen/crm/extensions/cards/models/ActionConfirmationBody.ts b/codegen/crm/extensions/cards/models/ActionConfirmationBody.ts index 7766ec713..a696b4bf5 100644 --- a/codegen/crm/extensions/cards/models/ActionConfirmationBody.ts +++ b/codegen/crm/extensions/cards/models/ActionConfirmationBody.ts @@ -12,19 +12,13 @@ export class ActionConfirmationBody { - 'prompt': string; 'confirmButtonLabel': string; 'cancelButtonLabel': string; + 'prompt': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "prompt", - "baseName": "prompt", - "type": "string", - "format": "" - }, { "name": "confirmButtonLabel", "baseName": "confirmButtonLabel", @@ -36,6 +30,12 @@ export class ActionConfirmationBody { "baseName": "cancelButtonLabel", "type": "string", "format": "" + }, + { + "name": "prompt", + "baseName": "prompt", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/crm/extensions/cards/models/ActionHookActionBody.ts b/codegen/crm/extensions/cards/models/ActionHookActionBody.ts index c6938fdeb..69dc53d17 100644 --- a/codegen/crm/extensions/cards/models/ActionHookActionBody.ts +++ b/codegen/crm/extensions/cards/models/ActionHookActionBody.ts @@ -13,20 +13,20 @@ import { ActionConfirmationBody } from '../models/ActionConfirmationBody'; export class ActionHookActionBody { - 'type': ActionHookActionBodyTypeEnum; + 'propertyNamesIncluded': Array; 'confirmation'?: ActionConfirmationBody; + 'label'?: string; + 'type': ActionHookActionBodyTypeEnum; 'httpMethod': ActionHookActionBodyHttpMethodEnum; 'url': string; - 'label'?: string; - 'propertyNamesIncluded': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "type", - "baseName": "type", - "type": "ActionHookActionBodyTypeEnum", + "name": "propertyNamesIncluded", + "baseName": "propertyNamesIncluded", + "type": "Array", "format": "" }, { @@ -36,27 +36,27 @@ export class ActionHookActionBody { "format": "" }, { - "name": "httpMethod", - "baseName": "httpMethod", - "type": "ActionHookActionBodyHttpMethodEnum", + "name": "label", + "baseName": "label", + "type": "string", "format": "" }, { - "name": "url", - "baseName": "url", - "type": "string", + "name": "type", + "baseName": "type", + "type": "ActionHookActionBodyTypeEnum", "format": "" }, { - "name": "label", - "baseName": "label", - "type": "string", + "name": "httpMethod", + "baseName": "httpMethod", + "type": "ActionHookActionBodyHttpMethodEnum", "format": "" }, { - "name": "propertyNamesIncluded", - "baseName": "propertyNamesIncluded", - "type": "Array", + "name": "url", + "baseName": "url", + "type": "string", "format": "" } ]; diff --git a/codegen/crm/extensions/cards/models/IntegratorObjectResultActionsInner.ts b/codegen/crm/extensions/cards/models/IntegratorObjectResultActionsInner.ts index bf7e7ced5..5510c6448 100644 --- a/codegen/crm/extensions/cards/models/IntegratorObjectResultActionsInner.ts +++ b/codegen/crm/extensions/cards/models/IntegratorObjectResultActionsInner.ts @@ -13,12 +13,12 @@ import { ActionConfirmationBody } from '../models/ActionConfirmationBody'; export class IntegratorObjectResultActionsInner { - 'type': IntegratorObjectResultActionsInnerTypeEnum; + 'propertyNamesIncluded': Array; 'confirmation'?: ActionConfirmationBody; + 'label'?: string; + 'type': IntegratorObjectResultActionsInnerTypeEnum; 'httpMethod': IntegratorObjectResultActionsInnerHttpMethodEnum; 'url': string; - 'label'?: string; - 'propertyNamesIncluded': Array; 'width': number; 'height': number; @@ -26,9 +26,9 @@ export class IntegratorObjectResultActionsInner { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "type", - "baseName": "type", - "type": "IntegratorObjectResultActionsInnerTypeEnum", + "name": "propertyNamesIncluded", + "baseName": "propertyNamesIncluded", + "type": "Array", "format": "" }, { @@ -38,27 +38,27 @@ export class IntegratorObjectResultActionsInner { "format": "" }, { - "name": "httpMethod", - "baseName": "httpMethod", - "type": "IntegratorObjectResultActionsInnerHttpMethodEnum", + "name": "label", + "baseName": "label", + "type": "string", "format": "" }, { - "name": "url", - "baseName": "url", - "type": "string", + "name": "type", + "baseName": "type", + "type": "IntegratorObjectResultActionsInnerTypeEnum", "format": "" }, { - "name": "label", - "baseName": "label", - "type": "string", + "name": "httpMethod", + "baseName": "httpMethod", + "type": "IntegratorObjectResultActionsInnerHttpMethodEnum", "format": "" }, { - "name": "propertyNamesIncluded", - "baseName": "propertyNamesIncluded", - "type": "Array", + "name": "url", + "baseName": "url", + "type": "string", "format": "" }, { diff --git a/codegen/crm/extensions/cards/models/ObjectSerializer.ts b/codegen/crm/extensions/cards/models/ObjectSerializer.ts index d55323a5d..133cfd0cd 100644 --- a/codegen/crm/extensions/cards/models/ObjectSerializer.ts +++ b/codegen/crm/extensions/cards/models/ObjectSerializer.ts @@ -23,7 +23,7 @@ export * from '../models/PublicCardResponse'; export * from '../models/TopLevelActions'; import { ActionConfirmationBody } from '../models/ActionConfirmationBody'; -import { ActionHookActionBody } from '../models/ActionHookActionBody'; +import { ActionHookActionBody } from '../models/ActionHookActionBody'; import { CardActions } from '../models/CardActions'; import { CardAuditResponse } from '../models/CardAuditResponse'; import { CardCreateRequest } from '../models/CardCreateRequest'; @@ -38,7 +38,7 @@ import { ErrorDetail } from '../models/ErrorDetail'; import { IFrameActionBody } from '../models/IFrameActionBody'; import { IntegratorCardPayloadResponse } from '../models/IntegratorCardPayloadResponse'; import { IntegratorObjectResult } from '../models/IntegratorObjectResult'; -import { IntegratorObjectResultActionsInner } from '../models/IntegratorObjectResultActionsInner'; +import { IntegratorObjectResultActionsInner } from '../models/IntegratorObjectResultActionsInner'; import { ModelError } from '../models/ModelError'; import { ObjectToken } from '../models/ObjectToken'; import { PublicCardFetchBody } from '../models/PublicCardFetchBody'; From b968e6260408d38747a65470012857778742265e Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 12:42:33 +0300 Subject: [PATCH 10/46] Remove CRM Extentions Accounting Discoveries --- .../crm/extensions/ExtensionsDiscovery.ts | 14 ------ .../accounting/AccountingDiscovery.ts | 44 ------------------- .../extensions/accounting/accounting.spec.ts | 12 ----- test/spec/crm/extensions/extensions.spec.ts | 2 - 4 files changed, 72 deletions(-) delete mode 100644 src/discovery/crm/extensions/accounting/AccountingDiscovery.ts delete mode 100644 test/spec/crm/extensions/accounting/accounting.spec.ts diff --git a/src/discovery/crm/extensions/ExtensionsDiscovery.ts b/src/discovery/crm/extensions/ExtensionsDiscovery.ts index 5b9f6e731..202e35fe5 100644 --- a/src/discovery/crm/extensions/ExtensionsDiscovery.ts +++ b/src/discovery/crm/extensions/ExtensionsDiscovery.ts @@ -1,27 +1,13 @@ import BaseDiscovery from '../../BaseDiscovery' -import type AccountingDiscovery from './accounting/AccountingDiscovery' import type CallingDiscovery from './calling/CallingDiscovery' import type CardsDiscovery from './cards/CardsDiscovery' import type VideoconferencingDiscovery from './videoconferencing/VideoconferencingDiscovery' export default class ExtensionsDiscovery extends BaseDiscovery { - protected _accounting: AccountingDiscovery | undefined protected _calling: CallingDiscovery | undefined protected _cards: CardsDiscovery | undefined protected _videoconferencing: VideoconferencingDiscovery | undefined - /** - * Getter - * @returns AccountingDiscovery - */ - get accounting() { - if (!this._accounting) { - const requiredClass = require('./accounting/AccountingDiscovery') - this._accounting = new requiredClass.default(this.config) as AccountingDiscovery - } - return this._accounting - } - /** * Getter * @returns CallingDiscovery diff --git a/src/discovery/crm/extensions/accounting/AccountingDiscovery.ts b/src/discovery/crm/extensions/accounting/AccountingDiscovery.ts deleted file mode 100644 index 2de83dd3b..000000000 --- a/src/discovery/crm/extensions/accounting/AccountingDiscovery.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - CallbacksApi, - createConfiguration, - InvoiceApi, - RequestContext, - ResponseContext, - ServerConfiguration, - SettingsApi, - SyncApi, - UserAccountsApi, -} from '../../../../../codegen/crm/extensions/accounting/index' -import { Observable } from '../../../../../codegen/crm/extensions/accounting/rxjsStub' -import { ApiClientConfigurator } from '../../../../configuration/ApiClientConfigurator' -import IConfiguration from '../../../../configuration/IConfiguration' -import ApiDecoratorService from '../../../../services/ApiDecoratorService' - -/** - * @deprecated - */ -export default class AccountingDiscovery { - public callbacksApi: CallbacksApi - public invoiceApi: InvoiceApi - public settingsApi: SettingsApi - public syncApi: SyncApi - public userAccountsApi: UserAccountsApi - - constructor(config: IConfiguration) { - const configuration = createConfiguration( - ApiClientConfigurator.getParams< - RequestContext, - ResponseContext, - Observable, - Observable, - ServerConfiguration<{}> - >(config, ServerConfiguration, Observable, Observable), - ) - - this.callbacksApi = ApiDecoratorService.getInstance().apply(new CallbacksApi(configuration)) - this.invoiceApi = ApiDecoratorService.getInstance().apply(new InvoiceApi(configuration)) - this.settingsApi = ApiDecoratorService.getInstance().apply(new SettingsApi(configuration)) - this.syncApi = ApiDecoratorService.getInstance().apply(new SyncApi(configuration)) - this.userAccountsApi = ApiDecoratorService.getInstance().apply(new UserAccountsApi(configuration)) - } -} diff --git a/test/spec/crm/extensions/accounting/accounting.spec.ts b/test/spec/crm/extensions/accounting/accounting.spec.ts deleted file mode 100644 index e66e68074..000000000 --- a/test/spec/crm/extensions/accounting/accounting.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Client } from '../../../../../index' - -describe('api client', () => { - it('is discoverable', () => { - const client = new Client().crm.extensions.accounting - expect(client.hasOwnProperty('callbacksApi')).toBeTruthy() - expect(client.hasOwnProperty('invoiceApi')).toBeTruthy() - expect(client.hasOwnProperty('settingsApi')).toBeTruthy() - expect(client.hasOwnProperty('syncApi')).toBeTruthy() - expect(client.hasOwnProperty('userAccountsApi')).toBeTruthy() - }) -}) diff --git a/test/spec/crm/extensions/extensions.spec.ts b/test/spec/crm/extensions/extensions.spec.ts index 5686b433e..6a72cad37 100644 --- a/test/spec/crm/extensions/extensions.spec.ts +++ b/test/spec/crm/extensions/extensions.spec.ts @@ -1,5 +1,4 @@ import { Client } from '../../../../index' -import AccountingDiscovery from '../../../../src/discovery/crm/extensions/accounting/AccountingDiscovery' import CallingDiscovery from '../../../../src/discovery/crm/extensions/calling/CallingDiscovery' import CardsDiscovery from '../../../../src/discovery/crm/extensions/cards/CardsDiscovery' import VideoconferencingDiscovery from '../../../../src/discovery/crm/extensions/videoconferencing/VideoconferencingDiscovery' @@ -7,7 +6,6 @@ import VideoconferencingDiscovery from '../../../../src/discovery/crm/extensions describe('api client', () => { it('is discoverable', () => { const client = new Client().crm.extensions - expect(AccountingDiscovery.name).toBe(client.accounting.constructor.name) expect(CallingDiscovery.name).toBe(client.calling.constructor.name) expect(CardsDiscovery.name).toBe(client.cards.constructor.name) expect(VideoconferencingDiscovery.name).toBe(client.videoconferencing.constructor.name) From 3b5dbba84693491f0a9fda9b1bffb8355cbb71a1 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 15:14:04 +0300 Subject: [PATCH 11/46] Codegen: CRM Line items and Owners --- codegen/crm/line_items/apis/BasicApi.ts | 6 +- codegen/crm/line_items/apis/BatchApi.ts | 96 ++++++++++++++- codegen/crm/line_items/apis/GDPRApi.ts | 102 ---------------- .../crm/line_items/apis/PublicObjectApi.ts | 106 ----------------- codegen/crm/line_items/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../crm/line_items/models/ObjectSerializer.ts | 23 +++- .../crm/line_items/models/PublicMergeInput.ts | 41 ------- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 15 ++- .../SimplePublicObjectBatchInputUpsert.ts | 58 +++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../models/SimplePublicUpsertObject.ts | 84 +++++++++++++ codegen/crm/line_items/models/all.ts | 7 +- .../crm/line_items/types/ObjectParamAPI.ts | 100 +++++----------- codegen/crm/line_items/types/ObservableAPI.ts | 110 ++++-------------- codegen/crm/line_items/types/PromiseAPI.ts | 97 ++++----------- ...lectionResponsePublicOwnerForwardPaging.ts | 2 +- codegen/crm/owners/models/ErrorDetail.ts | 2 +- codegen/crm/owners/models/ForwardPaging.ts | 2 +- codegen/crm/owners/models/ModelError.ts | 2 +- codegen/crm/owners/models/NextPage.ts | 2 +- codegen/crm/owners/models/ObjectSerializer.ts | 3 +- codegen/crm/owners/models/PublicOwner.ts | 22 +++- codegen/crm/owners/models/PublicTeam.ts | 2 +- 29 files changed, 575 insertions(+), 527 deletions(-) delete mode 100644 codegen/crm/line_items/apis/GDPRApi.ts delete mode 100644 codegen/crm/line_items/apis/PublicObjectApi.ts rename codegen/crm/line_items/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/line_items/models/PublicMergeInput.ts create mode 100644 codegen/crm/line_items/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/line_items/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/line_items/apis/BasicApi.ts b/codegen/crm/line_items/apis/BasicApi.ts index ee2fa96bb..22ad147d0 100644 --- a/codegen/crm/line_items/apis/BasicApi.ts +++ b/codegen/crm/line_items/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(lineItemId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param lineItemId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(lineItemId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/line_items/apis/BatchApi.ts b/codegen/crm/line_items/apis/BatchApi.ts index c548ecd9a..f4f54d7c1 100644 --- a/codegen/crm/line_items/apis/BatchApi.ts +++ b/codegen/crm/line_items/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/line_items/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/line_items/apis/GDPRApi.ts b/codegen/crm/line_items/apis/GDPRApi.ts deleted file mode 100644 index 022702f14..000000000 --- a/codegen/crm/line_items/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/line_items/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/line_items/apis/PublicObjectApi.ts b/codegen/crm/line_items/apis/PublicObjectApi.ts deleted file mode 100644 index 7950504e7..000000000 --- a/codegen/crm/line_items/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two line items with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/line_items/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/line_items/index.ts b/codegen/crm/line_items/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/line_items/index.ts +++ b/codegen/crm/line_items/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/line_items/models/PublicGdprDeleteInput.ts b/codegen/crm/line_items/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/line_items/models/PublicGdprDeleteInput.ts rename to codegen/crm/line_items/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 2f1160c23..512121789 100644 --- a/codegen/crm/line_items/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/line_items/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/line_items/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/line_items/models/BatchReadInputSimplePublicObjectId.ts index 04a6c75be..576f06029 100644 --- a/codegen/crm/line_items/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/line_items/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..dd19e082b --- /dev/null +++ b/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Line Items + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..7d4817050 --- /dev/null +++ b/codegen/crm/line_items/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Line Items + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/line_items/models/ObjectSerializer.ts b/codegen/crm/line_items/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/line_items/models/ObjectSerializer.ts +++ b/codegen/crm/line_items/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/line_items/models/PublicMergeInput.ts b/codegen/crm/line_items/models/PublicMergeInput.ts deleted file mode 100644 index 62cb7176c..000000000 --- a/codegen/crm/line_items/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Line Items - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/line_items/models/PublicObjectSearchRequest.ts b/codegen/crm/line_items/models/PublicObjectSearchRequest.ts index af4afa361..672cc7d76 100644 --- a/codegen/crm/line_items/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/line_items/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/line_items/models/SimplePublicObjectBatchInput.ts b/codegen/crm/line_items/models/SimplePublicObjectBatchInput.ts index 62f222547..4d3e5625f 100644 --- a/codegen/crm/line_items/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/line_items/models/SimplePublicObjectBatchInput.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/line_items/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/line_items/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..2a324af23 --- /dev/null +++ b/codegen/crm/line_items/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Line Items + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/line_items/models/SimplePublicObjectInput.ts b/codegen/crm/line_items/models/SimplePublicObjectInput.ts index 4ea15cd5a..a24961870 100644 --- a/codegen/crm/line_items/models/SimplePublicObjectInput.ts +++ b/codegen/crm/line_items/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/line_items/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/line_items/models/SimplePublicObjectInputForCreate.ts index f13866eb0..c904f94f7 100644 --- a/codegen/crm/line_items/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/line_items/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/line_items/models/SimplePublicUpsertObject.ts b/codegen/crm/line_items/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..bcd63138b --- /dev/null +++ b/codegen/crm/line_items/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Line Items + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/line_items/models/all.ts b/codegen/crm/line_items/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/line_items/models/all.ts +++ b/codegen/crm/line_items/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/line_items/types/ObjectParamAPI.ts b/codegen/crm/line_items/types/ObjectParamAPI.ts index ba995c6a3..818fd4e38 100644 --- a/codegen/crm/line_items/types/ObjectParamAPI.ts +++ b/codegen/crm/line_items/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -70,7 +71,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +131,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +218,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +227,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two line items with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two line items with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/line_items/types/ObservableAPI.ts b/codegen/crm/line_items/types/ObservableAPI.ts index d306c51bb..fe2c53b88 100644 --- a/codegen/crm/line_items/types/ObservableAPI.ts +++ b/codegen/crm/line_items/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -108,7 +109,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(lineItemId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(lineItemId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +138,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(lineItemId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(lineItemId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +188,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param lineItemId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(lineItemId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(lineItemId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +214,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param lineItemId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(lineItemId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(lineItemId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two line items with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two line items with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/line_items/types/PromiseAPI.ts b/codegen/crm/line_items/types/PromiseAPI.ts index 63f5c8c34..25b366ed6 100644 --- a/codegen/crm/line_items/types/PromiseAPI.ts +++ b/codegen/crm/line_items/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -78,7 +79,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(lineItemId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(lineItemId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +94,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(lineItemId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(lineItemId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +132,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param lineItemId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(lineItemId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(lineItemId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +144,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param lineItemId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(lineItemId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(lineItemId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of line items + * Update a batch of line items by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two line items with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two line items with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of line items by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/owners/models/CollectionResponsePublicOwnerForwardPaging.ts b/codegen/crm/owners/models/CollectionResponsePublicOwnerForwardPaging.ts index c048ea0d1..0b4001f56 100644 --- a/codegen/crm/owners/models/CollectionResponsePublicOwnerForwardPaging.ts +++ b/codegen/crm/owners/models/CollectionResponsePublicOwnerForwardPaging.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 diff --git a/codegen/crm/owners/models/ErrorDetail.ts b/codegen/crm/owners/models/ErrorDetail.ts index 2e535bc2b..1cc33cdcf 100644 --- a/codegen/crm/owners/models/ErrorDetail.ts +++ b/codegen/crm/owners/models/ErrorDetail.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 diff --git a/codegen/crm/owners/models/ForwardPaging.ts b/codegen/crm/owners/models/ForwardPaging.ts index a2c93577b..90c6a89f5 100644 --- a/codegen/crm/owners/models/ForwardPaging.ts +++ b/codegen/crm/owners/models/ForwardPaging.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 diff --git a/codegen/crm/owners/models/ModelError.ts b/codegen/crm/owners/models/ModelError.ts index 62453cc8b..cba0dfa8c 100644 --- a/codegen/crm/owners/models/ModelError.ts +++ b/codegen/crm/owners/models/ModelError.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 diff --git a/codegen/crm/owners/models/NextPage.ts b/codegen/crm/owners/models/NextPage.ts index a3cbcfb77..7cde953b9 100644 --- a/codegen/crm/owners/models/NextPage.ts +++ b/codegen/crm/owners/models/NextPage.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 diff --git a/codegen/crm/owners/models/ObjectSerializer.ts b/codegen/crm/owners/models/ObjectSerializer.ts index 404f34adf..d3586423f 100644 --- a/codegen/crm/owners/models/ObjectSerializer.ts +++ b/codegen/crm/owners/models/ObjectSerializer.ts @@ -11,7 +11,7 @@ import { ErrorDetail } from '../models/ErrorDetail'; import { ForwardPaging } from '../models/ForwardPaging'; import { ModelError } from '../models/ModelError'; import { NextPage } from '../models/NextPage'; -import { PublicOwner } from '../models/PublicOwner'; +import { PublicOwner } from '../models/PublicOwner'; import { PublicTeam } from '../models/PublicTeam'; /* tslint:disable:no-unused-variable */ @@ -27,6 +27,7 @@ let primitives = [ ]; let enumsMap: Set = new Set([ + "PublicOwnerTypeEnum", ]); let typeMap: {[index: string]: any} = { diff --git a/codegen/crm/owners/models/PublicOwner.ts b/codegen/crm/owners/models/PublicOwner.ts index 35b5b948e..f093d469a 100644 --- a/codegen/crm/owners/models/PublicOwner.ts +++ b/codegen/crm/owners/models/PublicOwner.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 @@ -19,6 +19,8 @@ export class PublicOwner { 'archived': boolean; 'teams'?: Array; 'id': string; + 'userIdIncludingInactive'?: number; + 'type': PublicOwnerTypeEnum; 'userId'?: number; 'email'?: string; 'updatedAt': Date; @@ -62,6 +64,18 @@ export class PublicOwner { "type": "string", "format": "" }, + { + "name": "userIdIncludingInactive", + "baseName": "userIdIncludingInactive", + "type": "number", + "format": "int32" + }, + { + "name": "type", + "baseName": "type", + "type": "PublicOwnerTypeEnum", + "format": "" + }, { "name": "userId", "baseName": "userId", @@ -89,3 +103,9 @@ export class PublicOwner { } } + +export enum PublicOwnerTypeEnum { + Person = 'PERSON', + Queue = 'QUEUE' +} + diff --git a/codegen/crm/owners/models/PublicTeam.ts b/codegen/crm/owners/models/PublicTeam.ts index 7e3134951..b1f409f6c 100644 --- a/codegen/crm/owners/models/PublicTeam.ts +++ b/codegen/crm/owners/models/PublicTeam.ts @@ -1,5 +1,5 @@ /** - * Crm Owners + * CRM Crm Owners * HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner\'s primary team. * * OpenAPI spec version: v3 From a4f04f6dadaa1ee2fe55ff1bf3738add1d9ae3a3 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 15:18:12 +0300 Subject: [PATCH 12/46] Update Crm Line items discovery --- src/discovery/crm/line_items/LineItemsDiscovery.ts | 6 ------ test/spec/crm/lineItems/lineItems.spec.ts | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/discovery/crm/line_items/LineItemsDiscovery.ts b/src/discovery/crm/line_items/LineItemsDiscovery.ts index 68fe0abbd..5376b09cd 100644 --- a/src/discovery/crm/line_items/LineItemsDiscovery.ts +++ b/src/discovery/crm/line_items/LineItemsDiscovery.ts @@ -3,8 +3,6 @@ import { BatchApi, Configuration, createConfiguration, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -20,8 +18,6 @@ import { getAll } from '../../../services/getAll' export default class LineItemsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -37,8 +33,6 @@ export default class LineItemsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } diff --git a/test/spec/crm/lineItems/lineItems.spec.ts b/test/spec/crm/lineItems/lineItems.spec.ts index cb1c40a6f..e047702ba 100644 --- a/test/spec/crm/lineItems/lineItems.spec.ts +++ b/test/spec/crm/lineItems/lineItems.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/line_items/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../codegen/crm/line_items/index' import { Client } from '../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From cb9a8730b867ca04842ea4be99f088e84bae114c Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 15:29:17 +0300 Subject: [PATCH 13/46] Codegen: CRM Objects --- codegen/crm/objects/apis/BasicApi.ts | 6 +- codegen/crm/objects/apis/BatchApi.ts | 102 ++++++++++++++++ codegen/crm/objects/apis/GDPRApi.ts | 110 ----------------- codegen/crm/objects/apis/PublicObjectApi.ts | 114 ------------------ codegen/crm/objects/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 ++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++++++++ .../crm/objects/models/ObjectSerializer.ts | 23 +++- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 9 +- ... => SimplePublicObjectBatchInputUpsert.ts} | 33 +++-- .../objects/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../models/SimplePublicUpsertObject.ts | 84 +++++++++++++ codegen/crm/objects/models/all.ts | 7 +- codegen/crm/objects/types/ObjectParamAPI.ts | 114 +++++------------- codegen/crm/objects/types/ObservableAPI.ts | 108 +++-------------- codegen/crm/objects/types/PromiseAPI.ts | 95 +++------------ 20 files changed, 514 insertions(+), 511 deletions(-) delete mode 100644 codegen/crm/objects/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/apis/PublicObjectApi.ts rename codegen/crm/objects/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (81%) create mode 100644 codegen/crm/objects/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts rename codegen/crm/objects/models/{PublicMergeInput.ts => SimplePublicObjectBatchInputUpsert.ts} (71%) create mode 100644 codegen/crm/objects/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/objects/apis/BasicApi.ts b/codegen/crm/objects/apis/BasicApi.ts index 1e1fd0696..ddf119375 100644 --- a/codegen/crm/objects/apis/BasicApi.ts +++ b/codegen/crm/objects/apis/BasicApi.ts @@ -130,7 +130,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(objectType: string, objectId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -283,12 +283,12 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param objectType * @param objectId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(objectType: string, objectId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/objects/apis/BatchApi.ts b/codegen/crm/objects/apis/BatchApi.ts index 065a16df0..22855f624 100644 --- a/codegen/crm/objects/apis/BatchApi.ts +++ b/codegen/crm/objects/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -247,6 +250,62 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values + * @param objectType + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(objectType: string, batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'objectType' is not null or undefined + if (objectType === null || objectType === undefined) { + throw new RequiredError("BatchApi", "upsert", "objectType"); + } + + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/{objectType}/batch/upsert' + .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -412,4 +471,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/apis/GDPRApi.ts b/codegen/crm/objects/apis/GDPRApi.ts deleted file mode 100644 index 969645d2d..000000000 --- a/codegen/crm/objects/apis/GDPRApi.ts +++ /dev/null @@ -1,110 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param objectType - * @param publicGdprDeleteInput - */ - public async purge(objectType: string, publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'objectType' is not null or undefined - if (objectType === null || objectType === undefined) { - throw new RequiredError("GDPRApi", "purge", "objectType"); - } - - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/{objectType}/gdpr-delete' - .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/apis/PublicObjectApi.ts b/codegen/crm/objects/apis/PublicObjectApi.ts deleted file mode 100644 index d143f9389..000000000 --- a/codegen/crm/objects/apis/PublicObjectApi.ts +++ /dev/null @@ -1,114 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two objects with same type - * @param objectType - * @param publicMergeInput - */ - public async merge(objectType: string, publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'objectType' is not null or undefined - if (objectType === null || objectType === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "objectType"); - } - - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/{objectType}/merge' - .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/index.ts b/codegen/crm/objects/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/index.ts +++ b/codegen/crm/objects/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 81% rename from codegen/crm/objects/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 171113695..2e13cad27 100644 --- a/codegen/crm/objects/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/models/BatchReadInputSimplePublicObjectId.ts index 6fdc9500c..0bfc026c1 100644 --- a/codegen/crm/objects/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..3f7ae8f06 --- /dev/null +++ b/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * CRM Objects + * CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are standard objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body. + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..1708497ef --- /dev/null +++ b/codegen/crm/objects/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * CRM Objects + * CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are standard objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body. + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/models/ObjectSerializer.ts b/codegen/crm/objects/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/models/ObjectSerializer.ts +++ b/codegen/crm/objects/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/models/PublicObjectSearchRequest.ts index 67f712c4f..67cac41ce 100644 --- a/codegen/crm/objects/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/models/SimplePublicObjectBatchInput.ts index 85cb4bd26..8d5b35a21 100644 --- a/codegen/crm/objects/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/models/SimplePublicObjectBatchInput.ts @@ -13,9 +13,10 @@ export class SimplePublicObjectBatchInput { /** - * The name of the unique property + * The name of a property whose values are unique for this object */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; /** * The id to be updated. This can be the object id, or the unique property value of the idProperty property */ @@ -31,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/models/PublicMergeInput.ts b/codegen/crm/objects/models/SimplePublicObjectBatchInputUpsert.ts similarity index 71% rename from codegen/crm/objects/models/PublicMergeInput.ts rename to codegen/crm/objects/models/SimplePublicObjectBatchInputUpsert.ts index ea835e982..9c8a6ad8d 100644 --- a/codegen/crm/objects/models/PublicMergeInput.ts +++ b/codegen/crm/objects/models/SimplePublicObjectBatchInputUpsert.ts @@ -11,28 +11,45 @@ */ -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", + "name": "idProperty", + "baseName": "idProperty", "type": "string", "format": "" }, { - "name": "primaryObjectId", - "baseName": "primaryObjectId", + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", "type": "string", "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" } ]; static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/models/SimplePublicObjectInput.ts b/codegen/crm/objects/models/SimplePublicObjectInput.ts index d58a1d39a..548faefa4 100644 --- a/codegen/crm/objects/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/models/SimplePublicObjectInputForCreate.ts index 826738b19..c3a233d3c 100644 --- a/codegen/crm/objects/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..a54120553 --- /dev/null +++ b/codegen/crm/objects/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * CRM Objects + * CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are standard objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body. + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/models/all.ts b/codegen/crm/objects/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/models/all.ts +++ b/codegen/crm/objects/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/types/ObjectParamAPI.ts b/codegen/crm/objects/types/ObjectParamAPI.ts index 254647daa..cb5c16b9e 100644 --- a/codegen/crm/objects/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -88,7 +89,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -160,7 +161,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -247,7 +248,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -256,7 +257,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -335,6 +336,21 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type string + * @memberof BatchApiupsert + */ + objectType: string + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -406,92 +422,22 @@ export class ObjectBatchApi { return this.api.update(param.objectType, param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type string - * @memberof GDPRApipurge - */ - objectType: string - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.objectType, param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.objectType, param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type string - * @memberof PublicObjectApimerge - */ - objectType: string - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.objectType, param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.objectType, param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.objectType, param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.objectType, param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/types/ObservableAPI.ts b/codegen/crm/objects/types/ObservableAPI.ts index 860501c66..fb861f121 100644 --- a/codegen/crm/objects/types/ObservableAPI.ts +++ b/codegen/crm/objects/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -113,7 +114,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(objectType: string, objectId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(objectType, objectId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -143,7 +144,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(objectType: string, objectId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(objectType, objectId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -195,12 +196,12 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param objectType * @param objectId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(objectType: string, objectId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(objectType, objectId, simplePublicObjectInput, idProperty, _options); @@ -222,12 +223,12 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param objectType * @param objectId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(objectType: string, objectId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(objectType, objectId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -385,84 +386,14 @@ export class ObservableBatchApi { return this.updateWithHttpInfo(objectType, batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param objectType - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(objectType: string, publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(objectType, publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param objectType - * @param publicGdprDeleteInput - */ - public purge(objectType: string, publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(objectType, publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param objectType - * @param publicMergeInput + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(objectType: string, publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(objectType, publicMergeInput, _options); + public upsertWithHttpInfo(objectType: string, batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(objectType, batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -476,17 +407,18 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param objectType - * @param publicMergeInput + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(objectType: string, publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(objectType, publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(objectType: string, batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(objectType, batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/types/PromiseAPI.ts b/codegen/crm/objects/types/PromiseAPI.ts index d3c260919..7a5bd10fc 100644 --- a/codegen/crm/objects/types/PromiseAPI.ts +++ b/codegen/crm/objects/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -83,7 +84,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(objectType: string, objectId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(objectType, objectId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -99,7 +100,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(objectType: string, objectId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(objectType, objectId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -139,12 +140,12 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param objectType * @param objectId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(objectType: string, objectId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(objectType, objectId, simplePublicObjectInput, idProperty, _options); @@ -152,12 +153,12 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{objectId}`or optionally a unique property value as specified by the `idProperty` query param. `{objectId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param objectType * @param objectId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(objectType: string, objectId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(objectType, objectId, simplePublicObjectInput, idProperty, _options); @@ -265,83 +266,25 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param objectType - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(objectType: string, publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(objectType, publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param objectType - * @param publicGdprDeleteInput - */ - public purge(objectType: string, publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(objectType, publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param objectType - * @param publicMergeInput + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(objectType: string, publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(objectType, publicMergeInput, _options); + public upsertWithHttpInfo(objectType: string, batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(objectType, batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two objects with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of objects by unique property values * @param objectType - * @param publicMergeInput + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(objectType: string, publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(objectType, publicMergeInput, _options); + public upsert(objectType: string, batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(objectType, batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } From 0c5b30b20910c13785e9eb1d902657da05244bc6 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 15:34:13 +0300 Subject: [PATCH 14/46] Update CRM Objects discovery --- src/discovery/crm/objects/ObjectsDiscovery.ts | 6 ------ test/spec/crm/objects/objects.spec.ts | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/discovery/crm/objects/ObjectsDiscovery.ts b/src/discovery/crm/objects/ObjectsDiscovery.ts index eea2ac27c..7f912a5c8 100644 --- a/src/discovery/crm/objects/ObjectsDiscovery.ts +++ b/src/discovery/crm/objects/ObjectsDiscovery.ts @@ -2,8 +2,6 @@ import { BasicApi, BatchApi, createConfiguration, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -29,8 +27,6 @@ import type TaxesDiscovery from './taxes/TaxesDiscovery' export default class ObjectsDiscovery extends BaseDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi protected _communications: CommunicationsDiscovery | undefined protected _calls: CallsDiscovery | undefined @@ -58,8 +54,6 @@ export default class ObjectsDiscovery extends BaseDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } diff --git a/test/spec/crm/objects/objects.spec.ts b/test/spec/crm/objects/objects.spec.ts index 18f177d06..67708c179 100644 --- a/test/spec/crm/objects/objects.spec.ts +++ b/test/spec/crm/objects/objects.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/objects/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../codegen/crm/objects/index' import { Client } from '../../../../index' import CallsDiscovery from '../../../../src/discovery/crm/objects/calls/CallsDiscovery' import CommunicationsDiscovery from '../../../../src/discovery/crm/objects/communications/CommunicationsDiscovery' @@ -30,10 +30,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From d717b3321636e5ac7fe9cb87a6bf78c76131a020 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 18:09:31 +0300 Subject: [PATCH 15/46] Codegen: CRM Calls, Feedback Submissions, Emails and Goals --- codegen/crm/objects/calls/apis/BasicApi.ts | 6 +- codegen/crm/objects/calls/apis/BatchApi.ts | 96 +++++- codegen/crm/objects/calls/apis/GDPRApi.ts | 102 ------ .../crm/objects/calls/apis/PublicObjectApi.ts | 106 ------ codegen/crm/objects/calls/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 12 +- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++ .../objects/calls/models/ObjectSerializer.ts | 23 +- .../calls/models/PublicGdprDeleteInput.ts | 41 --- .../objects/calls/models/PublicMergeInput.ts | 41 --- .../calls/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 + .../SimplePublicObjectBatchInputUpsert.ts} | 16 +- .../calls/models/SimplePublicObjectInput.ts | 7 + .../SimplePublicObjectInputForCreate.ts | 7 + .../calls/models/SimplePublicUpsertObject.ts | 84 +++++ codegen/crm/objects/calls/models/all.ts | 7 +- .../crm/objects/calls/types/ObjectParamAPI.ts | 100 ++---- .../crm/objects/calls/types/ObservableAPI.ts | 110 ++----- codegen/crm/objects/calls/types/PromiseAPI.ts | 97 ++---- .../objects/communications/apis/BasicApi.ts | 6 +- .../objects/communications/apis/BatchApi.ts | 96 +++++- .../objects/communications/apis/GDPRApi.ts | 102 ------ .../communications/apis/PublicObjectApi.ts | 106 ------ codegen/crm/objects/communications/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 12 +- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++ .../communications/models/ObjectSerializer.ts | 23 +- .../communications/models/PublicMergeInput.ts | 41 --- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 + ... => SimplePublicObjectBatchInputUpsert.ts} | 27 +- .../models/SimplePublicObjectInput.ts | 7 + .../SimplePublicObjectInputForCreate.ts | 7 + .../models/SimplePublicUpsertObject.ts | 84 +++++ .../crm/objects/communications/models/all.ts | 7 +- .../communications/types/ObjectParamAPI.ts | 100 ++---- .../communications/types/ObservableAPI.ts | 110 ++----- .../communications/types/PromiseAPI.ts | 97 ++---- codegen/crm/objects/emails/apis/BasicApi.ts | 6 +- codegen/crm/objects/emails/apis/BatchApi.ts | 96 +++++- codegen/crm/objects/emails/apis/GDPRApi.ts | 102 ------ .../objects/emails/apis/PublicObjectApi.ts | 106 ------ codegen/crm/objects/emails/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 12 +- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++ .../objects/emails/models/ObjectSerializer.ts | 23 +- .../emails/models/PublicGdprDeleteInput.ts | 41 --- .../objects/emails/models/PublicMergeInput.ts | 41 --- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 + .../SimplePublicObjectBatchInputUpsert.ts} | 16 +- .../emails/models/SimplePublicObjectInput.ts | 7 + .../SimplePublicObjectInputForCreate.ts | 7 + .../emails/models/SimplePublicUpsertObject.ts | 84 +++++ codegen/crm/objects/emails/models/all.ts | 7 +- .../objects/emails/types/ObjectParamAPI.ts | 100 ++---- .../crm/objects/emails/types/ObservableAPI.ts | 110 ++----- .../crm/objects/emails/types/PromiseAPI.ts | 97 ++---- .../feedback_submissions/apis/BasicApi.ts | 258 +-------------- .../feedback_submissions/apis/BatchApi.ts | 262 --------------- .../feedback_submissions/apis/GDPRApi.ts | 102 ------ .../apis/PublicObjectApi.ts | 106 ------ .../crm/objects/feedback_submissions/index.ts | 2 +- .../models/AssociationSpec.ts | 48 --- .../models/BatchInputSimplePublicObjectId.ts | 35 -- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../models/ObjectSerializer.ts | 34 -- .../models/PublicAssociationsForObject.ts | 43 --- .../models/PublicGdprDeleteInput.ts | 41 --- .../models/PublicMergeInput.ts | 41 --- .../models/PublicObjectId.ts | 34 -- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectInput.ts | 34 -- .../SimplePublicObjectInputForCreate.ts | 42 --- .../feedback_submissions/models/all.ts | 11 - .../types/ObjectParamAPI.ts | 254 +-------------- .../types/ObservableAPI.ts | 308 +----------------- .../feedback_submissions/types/PromiseAPI.ts | 206 +----------- codegen/crm/objects/goals/apis/BasicApi.ts | 250 +------------- codegen/crm/objects/goals/apis/BatchApi.ts | 248 +------------- codegen/crm/objects/goals/apis/GDPRApi.ts | 96 ------ .../crm/objects/goals/apis/PublicObjectApi.ts | 100 ------ codegen/crm/objects/goals/apis/SearchApi.ts | 6 + codegen/crm/objects/goals/index.ts | 2 +- .../objects/goals/models/AssociationSpec.ts | 48 --- .../BatchInputSimplePublicObjectBatchInput.ts | 35 -- ...chInputSimplePublicObjectInputForCreate.ts | 35 -- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../objects/goals/models/ObjectSerializer.ts | 34 -- .../models/PublicAssociationsForObject.ts | 43 --- .../goals/models/PublicGdprDeleteInput.ts | 41 --- .../objects/goals/models/PublicMergeInput.ts | 41 --- .../objects/goals/models/PublicObjectId.ts | 34 -- .../goals/models/PublicObjectSearchRequest.ts | 10 +- .../goals/models/SimplePublicObjectInput.ts | 34 -- .../SimplePublicObjectInputForCreate.ts | 42 --- codegen/crm/objects/goals/models/all.ts | 11 - .../crm/objects/goals/types/ObjectParamAPI.ts | 254 +-------------- .../crm/objects/goals/types/ObservableAPI.ts | 308 +----------------- codegen/crm/objects/goals/types/PromiseAPI.ts | 206 +----------- 107 files changed, 1558 insertions(+), 5329 deletions(-) delete mode 100644 codegen/crm/objects/calls/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/calls/apis/PublicObjectApi.ts rename codegen/crm/objects/{feedback_submissions/models/BatchInputSimplePublicObjectBatchInput.ts => calls/models/BatchInputSimplePublicObjectBatchInputUpsert.ts} (65%) create mode 100644 codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/calls/models/PublicGdprDeleteInput.ts delete mode 100644 codegen/crm/objects/calls/models/PublicMergeInput.ts rename codegen/crm/objects/{feedback_submissions/models/SimplePublicObjectBatchInput.ts => calls/models/SimplePublicObjectBatchInputUpsert.ts} (73%) create mode 100644 codegen/crm/objects/calls/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/communications/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/communications/apis/PublicObjectApi.ts rename codegen/crm/objects/{feedback_submissions/models/BatchInputSimplePublicObjectInputForCreate.ts => communications/models/BatchInputSimplePublicObjectBatchInputUpsert.ts} (64%) create mode 100644 codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/communications/models/PublicMergeInput.ts rename codegen/crm/objects/communications/models/{PublicGdprDeleteInput.ts => SimplePublicObjectBatchInputUpsert.ts} (55%) create mode 100644 codegen/crm/objects/communications/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/emails/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/emails/apis/PublicObjectApi.ts rename codegen/crm/objects/{goals/models/BatchInputSimplePublicObjectId.ts => emails/models/BatchInputSimplePublicObjectBatchInputUpsert.ts} (65%) create mode 100644 codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/emails/models/PublicGdprDeleteInput.ts delete mode 100644 codegen/crm/objects/emails/models/PublicMergeInput.ts rename codegen/crm/objects/{goals/models/SimplePublicObjectBatchInput.ts => emails/models/SimplePublicObjectBatchInputUpsert.ts} (73%) create mode 100644 codegen/crm/objects/emails/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/feedback_submissions/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/feedback_submissions/apis/PublicObjectApi.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/AssociationSpec.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectId.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/PublicAssociationsForObject.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/PublicGdprDeleteInput.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/PublicMergeInput.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/PublicObjectId.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInput.ts delete mode 100644 codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInputForCreate.ts delete mode 100644 codegen/crm/objects/goals/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/goals/apis/PublicObjectApi.ts delete mode 100644 codegen/crm/objects/goals/models/AssociationSpec.ts delete mode 100644 codegen/crm/objects/goals/models/BatchInputSimplePublicObjectBatchInput.ts delete mode 100644 codegen/crm/objects/goals/models/BatchInputSimplePublicObjectInputForCreate.ts delete mode 100644 codegen/crm/objects/goals/models/PublicAssociationsForObject.ts delete mode 100644 codegen/crm/objects/goals/models/PublicGdprDeleteInput.ts delete mode 100644 codegen/crm/objects/goals/models/PublicMergeInput.ts delete mode 100644 codegen/crm/objects/goals/models/PublicObjectId.ts delete mode 100644 codegen/crm/objects/goals/models/SimplePublicObjectInput.ts delete mode 100644 codegen/crm/objects/goals/models/SimplePublicObjectInputForCreate.ts diff --git a/codegen/crm/objects/calls/apis/BasicApi.ts b/codegen/crm/objects/calls/apis/BasicApi.ts index 1500bced2..f2df86c66 100644 --- a/codegen/crm/objects/calls/apis/BasicApi.ts +++ b/codegen/crm/objects/calls/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(callId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param callId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(callId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/objects/calls/apis/BatchApi.ts b/codegen/crm/objects/calls/apis/BatchApi.ts index e6f825d18..f680fcdcd 100644 --- a/codegen/crm/objects/calls/apis/BatchApi.ts +++ b/codegen/crm/objects/calls/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/calls/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/calls/apis/GDPRApi.ts b/codegen/crm/objects/calls/apis/GDPRApi.ts deleted file mode 100644 index 3dc09b6c4..000000000 --- a/codegen/crm/objects/calls/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/calls/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/calls/apis/PublicObjectApi.ts b/codegen/crm/objects/calls/apis/PublicObjectApi.ts deleted file mode 100644 index 39c86cb70..000000000 --- a/codegen/crm/objects/calls/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two calls with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/calls/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/calls/index.ts b/codegen/crm/objects/calls/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/calls/index.ts +++ b/codegen/crm/objects/calls/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectBatchInput.ts b/codegen/crm/objects/calls/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 65% rename from codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectBatchInput.ts rename to codegen/crm/objects/calls/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 7da213c93..366d0c782 100644 --- a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/calls/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -1,5 +1,5 @@ /** - * Feedback Submissions + * Calls * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 @@ -10,10 +10,10 @@ * Do not edit the class manually. */ -import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class BatchInputSimplePublicObjectBatchInput { - 'inputs': Array; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; @@ -21,12 +21,12 @@ export class BatchInputSimplePublicObjectBatchInput { { "name": "inputs", "baseName": "inputs", - "type": "Array", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return BatchInputSimplePublicObjectBatchInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/calls/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/calls/models/BatchReadInputSimplePublicObjectId.ts index 2da79c704..14f0af7a5 100644 --- a/codegen/crm/objects/calls/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/calls/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..6eba1ca6c --- /dev/null +++ b/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Calls + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..7026ad1ac --- /dev/null +++ b/codegen/crm/objects/calls/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Calls + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/calls/models/ObjectSerializer.ts b/codegen/crm/objects/calls/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/calls/models/ObjectSerializer.ts +++ b/codegen/crm/objects/calls/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/calls/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/calls/models/PublicGdprDeleteInput.ts deleted file mode 100644 index 171ec31e4..000000000 --- a/codegen/crm/objects/calls/models/PublicGdprDeleteInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Calls - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/calls/models/PublicMergeInput.ts b/codegen/crm/objects/calls/models/PublicMergeInput.ts deleted file mode 100644 index 774b4b74a..000000000 --- a/codegen/crm/objects/calls/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Calls - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/calls/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/calls/models/PublicObjectSearchRequest.ts index 4aaac8e5f..fc493e962 100644 --- a/codegen/crm/objects/calls/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/calls/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/calls/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/calls/models/SimplePublicObjectBatchInput.ts index b11b7610a..88337e9cb 100644 --- a/codegen/crm/objects/calls/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/calls/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/calls/models/SimplePublicObjectBatchInputUpsert.ts similarity index 73% rename from codegen/crm/objects/feedback_submissions/models/SimplePublicObjectBatchInput.ts rename to codegen/crm/objects/calls/models/SimplePublicObjectBatchInputUpsert.ts index dbfeb7287..6fefbfd83 100644 --- a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/calls/models/SimplePublicObjectBatchInputUpsert.ts @@ -1,5 +1,5 @@ /** - * Feedback Submissions + * Calls * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 @@ -11,8 +11,12 @@ */ -export class SimplePublicObjectBatchInput { +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +29,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", @@ -39,7 +49,7 @@ export class SimplePublicObjectBatchInput { } ]; static getAttributeTypeMap() { - return SimplePublicObjectBatchInput.attributeTypeMap; + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/calls/models/SimplePublicObjectInput.ts b/codegen/crm/objects/calls/models/SimplePublicObjectInput.ts index b82ae03bd..089e5b130 100644 --- a/codegen/crm/objects/calls/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/calls/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/calls/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/calls/models/SimplePublicObjectInputForCreate.ts index 23b6135cb..f5a03f1b4 100644 --- a/codegen/crm/objects/calls/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/calls/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/calls/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/calls/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..ca37344f7 --- /dev/null +++ b/codegen/crm/objects/calls/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Calls + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/calls/models/all.ts b/codegen/crm/objects/calls/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/calls/models/all.ts +++ b/codegen/crm/objects/calls/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/calls/types/ObjectParamAPI.ts b/codegen/crm/objects/calls/types/ObjectParamAPI.ts index a7eecc790..3c4eed3e1 100644 --- a/codegen/crm/objects/calls/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/calls/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -70,7 +71,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +131,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +218,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +227,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two calls with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two calls with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/calls/types/ObservableAPI.ts b/codegen/crm/objects/calls/types/ObservableAPI.ts index 45bcbb48f..77de9d11a 100644 --- a/codegen/crm/objects/calls/types/ObservableAPI.ts +++ b/codegen/crm/objects/calls/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -108,7 +109,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(callId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(callId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +138,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(callId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(callId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +188,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param callId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(callId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(callId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +214,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param callId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(callId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(callId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two calls with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two calls with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/calls/types/PromiseAPI.ts b/codegen/crm/objects/calls/types/PromiseAPI.ts index cb81202c7..18e993e3e 100644 --- a/codegen/crm/objects/calls/types/PromiseAPI.ts +++ b/codegen/crm/objects/calls/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -78,7 +79,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(callId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(callId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +94,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(callId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(callId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +132,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param callId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(callId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(callId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +144,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{callId}`. `{callId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{callId}`or optionally a unique property value as specified by the `idProperty` query param. `{callId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param callId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(callId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(callId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of calls + * Update a batch of calls by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two calls with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two calls with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of calls by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/communications/apis/BasicApi.ts b/codegen/crm/objects/communications/apis/BasicApi.ts index 246c3d1a3..ab6178e31 100644 --- a/codegen/crm/objects/communications/apis/BasicApi.ts +++ b/codegen/crm/objects/communications/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(communicationId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param communicationId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(communicationId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/objects/communications/apis/BatchApi.ts b/codegen/crm/objects/communications/apis/BatchApi.ts index ffba2564c..fdb1118db 100644 --- a/codegen/crm/objects/communications/apis/BatchApi.ts +++ b/codegen/crm/objects/communications/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/communications/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/communications/apis/GDPRApi.ts b/codegen/crm/objects/communications/apis/GDPRApi.ts deleted file mode 100644 index f3f0e4f2d..000000000 --- a/codegen/crm/objects/communications/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/communications/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/communications/apis/PublicObjectApi.ts b/codegen/crm/objects/communications/apis/PublicObjectApi.ts deleted file mode 100644 index 0abc4963c..000000000 --- a/codegen/crm/objects/communications/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two communications with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/communications/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/communications/index.ts b/codegen/crm/objects/communications/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/communications/index.ts +++ b/codegen/crm/objects/communications/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectInputForCreate.ts b/codegen/crm/objects/communications/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 64% rename from codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectInputForCreate.ts rename to codegen/crm/objects/communications/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 7b672a4f4..d23c624f3 100644 --- a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/communications/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -1,5 +1,5 @@ /** - * Feedback Submissions + * Communications * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 @@ -10,10 +10,10 @@ * Do not edit the class manually. */ -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class BatchInputSimplePublicObjectInputForCreate { - 'inputs': Array; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; @@ -21,12 +21,12 @@ export class BatchInputSimplePublicObjectInputForCreate { { "name": "inputs", "baseName": "inputs", - "type": "Array", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return BatchInputSimplePublicObjectInputForCreate.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/communications/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/communications/models/BatchReadInputSimplePublicObjectId.ts index ef174d7f5..bd27ab66a 100644 --- a/codegen/crm/objects/communications/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/communications/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..19a35358e --- /dev/null +++ b/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Communications + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..6793cc389 --- /dev/null +++ b/codegen/crm/objects/communications/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Communications + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/communications/models/ObjectSerializer.ts b/codegen/crm/objects/communications/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/communications/models/ObjectSerializer.ts +++ b/codegen/crm/objects/communications/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/communications/models/PublicMergeInput.ts b/codegen/crm/objects/communications/models/PublicMergeInput.ts deleted file mode 100644 index fe6d1e9b7..000000000 --- a/codegen/crm/objects/communications/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Communications - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/communications/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/communications/models/PublicObjectSearchRequest.ts index 0cd27d6a6..1d62ba23e 100644 --- a/codegen/crm/objects/communications/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/communications/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/communications/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/communications/models/SimplePublicObjectBatchInput.ts index f240b1533..8a3234686 100644 --- a/codegen/crm/objects/communications/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/communications/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/communications/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/communications/models/SimplePublicObjectBatchInputUpsert.ts similarity index 55% rename from codegen/crm/objects/communications/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/communications/models/SimplePublicObjectBatchInputUpsert.ts index ffaf0539e..27823c72f 100644 --- a/codegen/crm/objects/communications/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/communications/models/SimplePublicObjectBatchInputUpsert.ts @@ -11,9 +11,14 @@ */ -export class PublicGdprDeleteInput { +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; - 'objectId': string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,14 +30,26 @@ export class PublicGdprDeleteInput { "format": "" }, { - "name": "objectId", - "baseName": "objectId", + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", "type": "string", "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/communications/models/SimplePublicObjectInput.ts b/codegen/crm/objects/communications/models/SimplePublicObjectInput.ts index dfe5c7482..fa43f762c 100644 --- a/codegen/crm/objects/communications/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/communications/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/communications/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/communications/models/SimplePublicObjectInputForCreate.ts index 0d1b47387..cb43fcc21 100644 --- a/codegen/crm/objects/communications/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/communications/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/communications/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/communications/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..d67ce369f --- /dev/null +++ b/codegen/crm/objects/communications/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Communications + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/communications/models/all.ts b/codegen/crm/objects/communications/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/communications/models/all.ts +++ b/codegen/crm/objects/communications/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/communications/types/ObjectParamAPI.ts b/codegen/crm/objects/communications/types/ObjectParamAPI.ts index 1fc1ec157..cf9212476 100644 --- a/codegen/crm/objects/communications/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/communications/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -70,7 +71,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +131,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +218,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +227,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two communications with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two communications with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/communications/types/ObservableAPI.ts b/codegen/crm/objects/communications/types/ObservableAPI.ts index dca47c8f4..d28d7c001 100644 --- a/codegen/crm/objects/communications/types/ObservableAPI.ts +++ b/codegen/crm/objects/communications/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -108,7 +109,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(communicationId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(communicationId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +138,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(communicationId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(communicationId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +188,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param communicationId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(communicationId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(communicationId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +214,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param communicationId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(communicationId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(communicationId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two communications with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two communications with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/communications/types/PromiseAPI.ts b/codegen/crm/objects/communications/types/PromiseAPI.ts index eb9cec4ff..d473b8f2f 100644 --- a/codegen/crm/objects/communications/types/PromiseAPI.ts +++ b/codegen/crm/objects/communications/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -78,7 +79,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(communicationId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(communicationId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +94,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(communicationId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(communicationId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +132,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param communicationId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(communicationId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(communicationId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +144,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{communicationId}`. `{communicationId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{communicationId}`or optionally a unique property value as specified by the `idProperty` query param. `{communicationId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param communicationId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(communicationId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(communicationId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of communications + * Update a batch of communications by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two communications with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two communications with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of communications by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/emails/apis/BasicApi.ts b/codegen/crm/objects/emails/apis/BasicApi.ts index 79b0f7e4d..0c6eb1d94 100644 --- a/codegen/crm/objects/emails/apis/BasicApi.ts +++ b/codegen/crm/objects/emails/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(emailId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param emailId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async update(emailId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/objects/emails/apis/BatchApi.ts b/codegen/crm/objects/emails/apis/BatchApi.ts index fc81eaf99..a1c66fb40 100644 --- a/codegen/crm/objects/emails/apis/BatchApi.ts +++ b/codegen/crm/objects/emails/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/emails/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/emails/apis/GDPRApi.ts b/codegen/crm/objects/emails/apis/GDPRApi.ts deleted file mode 100644 index d5a555deb..000000000 --- a/codegen/crm/objects/emails/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/emails/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/emails/apis/PublicObjectApi.ts b/codegen/crm/objects/emails/apis/PublicObjectApi.ts deleted file mode 100644 index ce6d08490..000000000 --- a/codegen/crm/objects/emails/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two emails with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/emails/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/emails/index.ts b/codegen/crm/objects/emails/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/emails/index.ts +++ b/codegen/crm/objects/emails/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectId.ts b/codegen/crm/objects/emails/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 65% rename from codegen/crm/objects/goals/models/BatchInputSimplePublicObjectId.ts rename to codegen/crm/objects/emails/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index e9ae8b672..f8e150cd6 100644 --- a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/emails/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -1,5 +1,5 @@ /** - * Goal Targets + * Emails * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 @@ -10,10 +10,10 @@ * Do not edit the class manually. */ -import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class BatchInputSimplePublicObjectId { - 'inputs': Array; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; @@ -21,12 +21,12 @@ export class BatchInputSimplePublicObjectId { { "name": "inputs", "baseName": "inputs", - "type": "Array", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return BatchInputSimplePublicObjectId.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/emails/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/emails/models/BatchReadInputSimplePublicObjectId.ts index 24249b10f..ab00f0d84 100644 --- a/codegen/crm/objects/emails/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/emails/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..9e0b93fa9 --- /dev/null +++ b/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Emails + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..72f0c9bd3 --- /dev/null +++ b/codegen/crm/objects/emails/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Emails + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/emails/models/ObjectSerializer.ts b/codegen/crm/objects/emails/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/emails/models/ObjectSerializer.ts +++ b/codegen/crm/objects/emails/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/emails/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/emails/models/PublicGdprDeleteInput.ts deleted file mode 100644 index c386b5eb3..000000000 --- a/codegen/crm/objects/emails/models/PublicGdprDeleteInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Emails - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/emails/models/PublicMergeInput.ts b/codegen/crm/objects/emails/models/PublicMergeInput.ts deleted file mode 100644 index 0752f99d9..000000000 --- a/codegen/crm/objects/emails/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Emails - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/emails/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/emails/models/PublicObjectSearchRequest.ts index 972c0d37c..eccdbf369 100644 --- a/codegen/crm/objects/emails/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/emails/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/emails/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/emails/models/SimplePublicObjectBatchInput.ts index 743015e6a..3fed6eb0a 100644 --- a/codegen/crm/objects/emails/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/emails/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/goals/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/emails/models/SimplePublicObjectBatchInputUpsert.ts similarity index 73% rename from codegen/crm/objects/goals/models/SimplePublicObjectBatchInput.ts rename to codegen/crm/objects/emails/models/SimplePublicObjectBatchInputUpsert.ts index 45bf93c7c..064dbdebc 100644 --- a/codegen/crm/objects/goals/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/emails/models/SimplePublicObjectBatchInputUpsert.ts @@ -1,5 +1,5 @@ /** - * Goal Targets + * Emails * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 @@ -11,8 +11,12 @@ */ -export class SimplePublicObjectBatchInput { +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +29,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", @@ -39,7 +49,7 @@ export class SimplePublicObjectBatchInput { } ]; static getAttributeTypeMap() { - return SimplePublicObjectBatchInput.attributeTypeMap; + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/emails/models/SimplePublicObjectInput.ts b/codegen/crm/objects/emails/models/SimplePublicObjectInput.ts index 478b85339..531c72488 100644 --- a/codegen/crm/objects/emails/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/emails/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/emails/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/emails/models/SimplePublicObjectInputForCreate.ts index fc7cbe85c..9dffecd69 100644 --- a/codegen/crm/objects/emails/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/emails/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/emails/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/emails/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..fdc1c2cbe --- /dev/null +++ b/codegen/crm/objects/emails/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Emails + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/emails/models/all.ts b/codegen/crm/objects/emails/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/emails/models/all.ts +++ b/codegen/crm/objects/emails/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/emails/types/ObjectParamAPI.ts b/codegen/crm/objects/emails/types/ObjectParamAPI.ts index 1c0a663f8..11d4ad07a 100644 --- a/codegen/crm/objects/emails/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/emails/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -70,7 +71,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +131,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApiupdate */ @@ -217,7 +218,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +227,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two emails with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two emails with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/emails/types/ObservableAPI.ts b/codegen/crm/objects/emails/types/ObservableAPI.ts index 9a0fcc886..de4c36c82 100644 --- a/codegen/crm/objects/emails/types/ObservableAPI.ts +++ b/codegen/crm/objects/emails/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -108,7 +109,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(emailId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(emailId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +138,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(emailId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(emailId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +188,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param emailId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(emailId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(emailId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +214,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param emailId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(emailId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(emailId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two emails with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two emails with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/emails/types/PromiseAPI.ts b/codegen/crm/objects/emails/types/PromiseAPI.ts index 315787be6..047c3548d 100644 --- a/codegen/crm/objects/emails/types/PromiseAPI.ts +++ b/codegen/crm/objects/emails/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -78,7 +79,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(emailId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(emailId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +94,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(emailId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(emailId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +132,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param emailId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public updateWithHttpInfo(emailId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(emailId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +144,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{emailId}`. `{emailId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{emailId}`or optionally a unique property value as specified by the `idProperty` query param. `{emailId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param emailId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public update(emailId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(emailId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of emails + * Update a batch of emails by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two emails with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two emails with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of emails by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/feedback_submissions/apis/BasicApi.ts b/codegen/crm/objects/feedback_submissions/apis/BasicApi.ts index c4db0c8aa..3c27a8264 100644 --- a/codegen/crm/objects/feedback_submissions/apis/BasicApi.ts +++ b/codegen/crm/objects/feedback_submissions/apis/BasicApi.ts @@ -9,9 +9,6 @@ import {SecurityAuthentication} from '../auth/auth'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; /** @@ -19,92 +16,6 @@ import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObject */ export class BasicApiRequestFactory extends BaseAPIRequestFactory { - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param feedbackSubmissionId - */ - public async archive(feedbackSubmissionId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'feedbackSubmissionId' is not null or undefined - if (feedbackSubmissionId === null || feedbackSubmissionId === undefined) { - throw new RequiredError("BasicApi", "archive", "feedbackSubmissionId"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}' - .replace('{' + 'feedbackSubmissionId' + '}', encodeURIComponent(String(feedbackSubmissionId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public async create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'simplePublicObjectInputForCreate' is not null or undefined - if (simplePublicObjectInputForCreate === null || simplePublicObjectInputForCreate === undefined) { - throw new RequiredError("BasicApi", "create", "simplePublicObjectInputForCreate"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(simplePublicObjectInputForCreate, "SimplePublicObjectInputForCreate", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -113,7 +24,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(feedbackSubmissionId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -250,141 +161,10 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param feedbackSubmissionId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public async update(feedbackSubmissionId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'feedbackSubmissionId' is not null or undefined - if (feedbackSubmissionId === null || feedbackSubmissionId === undefined) { - throw new RequiredError("BasicApi", "update", "feedbackSubmissionId"); - } - - - // verify required parameter 'simplePublicObjectInput' is not null or undefined - if (simplePublicObjectInput === null || simplePublicObjectInput === undefined) { - throw new RequiredError("BasicApi", "update", "simplePublicObjectInput"); - } - - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}' - .replace('{' + 'feedbackSubmissionId' + '}', encodeURIComponent(String(feedbackSubmissionId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (idProperty !== undefined) { - requestContext.setQueryParam("idProperty", ObjectSerializer.serialize(idProperty, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(simplePublicObjectInput, "SimplePublicObjectInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - } export class BasicApiResponseProcessor { - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to create - * @throws ApiException if the response code was not in [200, 299] - */ - public async createWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("201", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -457,40 +237,4 @@ export class BasicApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - } diff --git a/codegen/crm/objects/feedback_submissions/apis/BatchApi.ts b/codegen/crm/objects/feedback_submissions/apis/BatchApi.ts index 87399193e..6fb37e4d1 100644 --- a/codegen/crm/objects/feedback_submissions/apis/BatchApi.ts +++ b/codegen/crm/objects/feedback_submissions/apis/BatchApi.ts @@ -8,9 +8,6 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -20,100 +17,6 @@ import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchRespon */ export class BatchApiRequestFactory extends BaseAPIRequestFactory { - /** - * Archive a batch of feedback submissions by ID - * @param batchInputSimplePublicObjectId - */ - public async archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectId' is not null or undefined - if (batchInputSimplePublicObjectId === null || batchInputSimplePublicObjectId === undefined) { - throw new RequiredError("BatchApi", "archive", "batchInputSimplePublicObjectId"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/batch/archive'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectId, "BatchInputSimplePublicObjectId", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Create a batch of feedback submissions - * @param batchInputSimplePublicObjectInputForCreate - */ - public async create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectInputForCreate' is not null or undefined - if (batchInputSimplePublicObjectInputForCreate === null || batchInputSimplePublicObjectInputForCreate === undefined) { - throw new RequiredError("BatchApi", "create", "batchInputSimplePublicObjectInputForCreate"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/batch/create'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectInputForCreate, "BatchInputSimplePublicObjectInputForCreate", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * Read a batch of feedback submissions by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -168,132 +71,10 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - /** - * Update a batch of feedback submissions - * @param batchInputSimplePublicObjectBatchInput - */ - public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectBatchInput' is not null or undefined - if (batchInputSimplePublicObjectBatchInput === null || batchInputSimplePublicObjectBatchInput === undefined) { - throw new RequiredError("BatchApi", "update", "batchInputSimplePublicObjectBatchInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/batch/update'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInput, "BatchInputSimplePublicObjectBatchInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - } export class BatchApiResponseProcessor { - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to create - * @throws ApiException if the response code was not in [200, 299] - */ - public async createWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("201", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject", "" - ) as BatchResponseSimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("207", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -337,47 +118,4 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject", "" - ) as BatchResponseSimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("207", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - } diff --git a/codegen/crm/objects/feedback_submissions/apis/GDPRApi.ts b/codegen/crm/objects/feedback_submissions/apis/GDPRApi.ts deleted file mode 100644 index f24c00d4e..000000000 --- a/codegen/crm/objects/feedback_submissions/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/feedback_submissions/apis/PublicObjectApi.ts b/codegen/crm/objects/feedback_submissions/apis/PublicObjectApi.ts deleted file mode 100644 index 870ab7694..000000000 --- a/codegen/crm/objects/feedback_submissions/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two feedback submissions with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/feedback_submissions/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/feedback_submissions/index.ts b/codegen/crm/objects/feedback_submissions/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/feedback_submissions/index.ts +++ b/codegen/crm/objects/feedback_submissions/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/feedback_submissions/models/AssociationSpec.ts b/codegen/crm/objects/feedback_submissions/models/AssociationSpec.ts deleted file mode 100644 index 7b9ab0e33..000000000 --- a/codegen/crm/objects/feedback_submissions/models/AssociationSpec.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AssociationSpec { - 'associationCategory': AssociationSpecAssociationCategoryEnum; - 'associationTypeId': number; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "associationCategory", - "baseName": "associationCategory", - "type": "AssociationSpecAssociationCategoryEnum", - "format": "" - }, - { - "name": "associationTypeId", - "baseName": "associationTypeId", - "type": "number", - "format": "int32" - } ]; - - static getAttributeTypeMap() { - return AssociationSpec.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum AssociationSpecAssociationCategoryEnum { - HubspotDefined = 'HUBSPOT_DEFINED', - UserDefined = 'USER_DEFINED', - IntegratorDefined = 'INTEGRATOR_DEFINED' -} - diff --git a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectId.ts b/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectId.ts deleted file mode 100644 index 6b7a1eca5..000000000 --- a/codegen/crm/objects/feedback_submissions/models/BatchInputSimplePublicObjectId.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; - -export class BatchInputSimplePublicObjectId { - 'inputs': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "inputs", - "baseName": "inputs", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return BatchInputSimplePublicObjectId.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/feedback_submissions/models/BatchReadInputSimplePublicObjectId.ts index e53e1792d..89cd9b5de 100644 --- a/codegen/crm/objects/feedback_submissions/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/feedback_submissions/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/feedback_submissions/models/ObjectSerializer.ts b/codegen/crm/objects/feedback_submissions/models/ObjectSerializer.ts index 78bbe565d..65c68aa7f 100644 --- a/codegen/crm/objects/feedback_submissions/models/ObjectSerializer.ts +++ b/codegen/crm/objects/feedback_submissions/models/ObjectSerializer.ts @@ -1,8 +1,4 @@ export * from '../models/AssociatedId'; -export * from '../models/AssociationSpec'; -export * from '../models/BatchInputSimplePublicObjectBatchInput'; -export * from '../models/BatchInputSimplePublicObjectId'; -export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -17,25 +13,14 @@ export * from '../models/ModelError'; export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; -export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; -export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; -export * from '../models/SimplePublicObjectBatchInput'; export * from '../models/SimplePublicObjectId'; -export * from '../models/SimplePublicObjectInput'; -export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; -import { AssociationSpec } from '../models/AssociationSpec'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -50,16 +35,9 @@ import { ModelError } from '../models/ModelError'; import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; -import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -77,7 +55,6 @@ let primitives = [ ]; let enumsMap: Set = new Set([ - "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", "FilterOperatorEnum", @@ -85,10 +62,6 @@ let enumsMap: Set = new Set([ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, - "AssociationSpec": AssociationSpec, - "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, - "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, - "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, @@ -103,16 +76,9 @@ let typeMap: {[index: string]: any} = { "NextPage": NextPage, "Paging": Paging, "PreviousPage": PreviousPage, - "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, - "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, - "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, "SimplePublicObjectId": SimplePublicObjectId, - "SimplePublicObjectInput": SimplePublicObjectInput, - "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, diff --git a/codegen/crm/objects/feedback_submissions/models/PublicAssociationsForObject.ts b/codegen/crm/objects/feedback_submissions/models/PublicAssociationsForObject.ts deleted file mode 100644 index c3df0a77a..000000000 --- a/codegen/crm/objects/feedback_submissions/models/PublicAssociationsForObject.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AssociationSpec } from '../models/AssociationSpec'; -import { PublicObjectId } from '../models/PublicObjectId'; - -export class PublicAssociationsForObject { - 'types': Array; - 'to': PublicObjectId; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "types", - "baseName": "types", - "type": "Array", - "format": "" - }, - { - "name": "to", - "baseName": "to", - "type": "PublicObjectId", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicAssociationsForObject.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/feedback_submissions/models/PublicGdprDeleteInput.ts deleted file mode 100644 index 1289cb7f7..000000000 --- a/codegen/crm/objects/feedback_submissions/models/PublicGdprDeleteInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/PublicMergeInput.ts b/codegen/crm/objects/feedback_submissions/models/PublicMergeInput.ts deleted file mode 100644 index f7d8d8cc4..000000000 --- a/codegen/crm/objects/feedback_submissions/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/PublicObjectId.ts b/codegen/crm/objects/feedback_submissions/models/PublicObjectId.ts deleted file mode 100644 index 30acdb4b7..000000000 --- a/codegen/crm/objects/feedback_submissions/models/PublicObjectId.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicObjectId { - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicObjectId.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/feedback_submissions/models/PublicObjectSearchRequest.ts index 7105f5fe4..1e37b71bc 100644 --- a/codegen/crm/objects/feedback_submissions/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/feedback_submissions/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInput.ts b/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInput.ts deleted file mode 100644 index ff355c16f..000000000 --- a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInput.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class SimplePublicObjectInput { - 'properties': { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SimplePublicObjectInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInputForCreate.ts deleted file mode 100644 index 7720af48c..000000000 --- a/codegen/crm/objects/feedback_submissions/models/SimplePublicObjectInputForCreate.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Feedback Submissions - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; - -export class SimplePublicObjectInputForCreate { - 'associations': Array; - 'properties': { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "associations", - "baseName": "associations", - "type": "Array", - "format": "" - }, - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SimplePublicObjectInputForCreate.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/feedback_submissions/models/all.ts b/codegen/crm/objects/feedback_submissions/models/all.ts index 16a8dee1d..d63b41619 100644 --- a/codegen/crm/objects/feedback_submissions/models/all.ts +++ b/codegen/crm/objects/feedback_submissions/models/all.ts @@ -1,8 +1,4 @@ export * from '../models/AssociatedId' -export * from '../models/AssociationSpec' -export * from '../models/BatchInputSimplePublicObjectBatchInput' -export * from '../models/BatchInputSimplePublicObjectId' -export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' @@ -17,16 +13,9 @@ export * from '../models/ModelError' export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' -export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' -export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' -export * from '../models/SimplePublicObjectBatchInput' export * from '../models/SimplePublicObjectId' -export * from '../models/SimplePublicObjectInput' -export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/feedback_submissions/types/ObjectParamAPI.ts b/codegen/crm/objects/feedback_submissions/types/ObjectParamAPI.ts index 8036eba0e..2f0e894a5 100644 --- a/codegen/crm/objects/feedback_submissions/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/feedback_submissions/types/ObjectParamAPI.ts @@ -1,43 +1,17 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { ObservableBasicApi } from "./ObservableAPI"; import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; -export interface BasicApiArchiveRequest { - /** - * - * @type string - * @memberof BasicApiarchive - */ - feedbackSubmissionId: string -} - -export interface BasicApiCreateRequest { - /** - * - * @type SimplePublicObjectInputForCreate - * @memberof BasicApicreate - */ - simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate -} - export interface BasicApiGetByIdRequest { /** * @@ -70,7 +44,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -116,27 +90,6 @@ export interface BasicApiGetPageRequest { archived?: boolean } -export interface BasicApiUpdateRequest { - /** - * - * @type string - * @memberof BasicApiupdate - */ - feedbackSubmissionId: string - /** - * - * @type SimplePublicObjectInput - * @memberof BasicApiupdate - */ - simplePublicObjectInput: SimplePublicObjectInput - /** - * The name of a property whose values are unique for this object type - * @type string - * @memberof BasicApiupdate - */ - idProperty?: string -} - export class ObjectBasicApi { private api: ObservableBasicApi @@ -144,42 +97,6 @@ export class ObjectBasicApi { this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param param the request object - */ - public archiveWithHttpInfo(param: BasicApiArchiveRequest, options?: Configuration): Promise> { - return this.api.archiveWithHttpInfo(param.feedbackSubmissionId, options).toPromise(); - } - - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param param the request object - */ - public archive(param: BasicApiArchiveRequest, options?: Configuration): Promise { - return this.api.archive(param.feedbackSubmissionId, options).toPromise(); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param param the request object - */ - public createWithHttpInfo(param: BasicApiCreateRequest, options?: Configuration): Promise> { - return this.api.createWithHttpInfo(param.simplePublicObjectInputForCreate, options).toPromise(); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param param the request object - */ - public create(param: BasicApiCreateRequest, options?: Configuration): Promise { - return this.api.create(param.simplePublicObjectInputForCreate, options).toPromise(); - } - /** * Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -216,47 +133,11 @@ export class ObjectBasicApi { return this.api.getPage(param.limit, param.after, param.properties, param.propertiesWithHistory, param.associations, param.archived, options).toPromise(); } - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param param the request object - */ - public updateWithHttpInfo(param: BasicApiUpdateRequest, options?: Configuration): Promise> { - return this.api.updateWithHttpInfo(param.feedbackSubmissionId, param.simplePublicObjectInput, param.idProperty, options).toPromise(); - } - - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param param the request object - */ - public update(param: BasicApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.feedbackSubmissionId, param.simplePublicObjectInput, param.idProperty, options).toPromise(); - } - } import { ObservableBatchApi } from "./ObservableAPI"; import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; -export interface BatchApiArchiveRequest { - /** - * - * @type BatchInputSimplePublicObjectId - * @memberof BatchApiarchive - */ - batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId -} - -export interface BatchApiCreateRequest { - /** - * - * @type BatchInputSimplePublicObjectInputForCreate - * @memberof BatchApicreate - */ - batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate -} - export interface BatchApiReadRequest { /** * @@ -272,15 +153,6 @@ export interface BatchApiReadRequest { archived?: boolean } -export interface BatchApiUpdateRequest { - /** - * - * @type BatchInputSimplePublicObjectBatchInput - * @memberof BatchApiupdate - */ - batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput -} - export class ObjectBatchApi { private api: ObservableBatchApi @@ -288,38 +160,6 @@ export class ObjectBatchApi { this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); } - /** - * Archive a batch of feedback submissions by ID - * @param param the request object - */ - public archiveWithHttpInfo(param: BatchApiArchiveRequest, options?: Configuration): Promise> { - return this.api.archiveWithHttpInfo(param.batchInputSimplePublicObjectId, options).toPromise(); - } - - /** - * Archive a batch of feedback submissions by ID - * @param param the request object - */ - public archive(param: BatchApiArchiveRequest, options?: Configuration): Promise { - return this.api.archive(param.batchInputSimplePublicObjectId, options).toPromise(); - } - - /** - * Create a batch of feedback submissions - * @param param the request object - */ - public createWithHttpInfo(param: BatchApiCreateRequest, options?: Configuration): Promise> { - return this.api.createWithHttpInfo(param.batchInputSimplePublicObjectInputForCreate, options).toPromise(); - } - - /** - * Create a batch of feedback submissions - * @param param the request object - */ - public create(param: BatchApiCreateRequest, options?: Configuration): Promise { - return this.api.create(param.batchInputSimplePublicObjectInputForCreate, options).toPromise(); - } - /** * Read a batch of feedback submissions by internal ID, or unique property values * @param param the request object @@ -336,98 +176,6 @@ export class ObjectBatchApi { return this.api.read(param.batchReadInputSimplePublicObjectId, param.archived, options).toPromise(); } - /** - * Update a batch of feedback submissions - * @param param the request object - */ - public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { - return this.api.updateWithHttpInfo(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); - } - - /** - * Update a batch of feedback submissions - * @param param the request object - */ - public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); - } - -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - - /** - * Merge two feedback submissions with same type - * @param param the request object - */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); - } - - /** - * Merge two feedback submissions with same type - * @param param the request object - */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); - } - } import { ObservableSearchApi } from "./ObservableAPI"; diff --git a/codegen/crm/objects/feedback_submissions/types/ObservableAPI.ts b/codegen/crm/objects/feedback_submissions/types/ObservableAPI.ts index ee1d0114a..da83ea5e6 100644 --- a/codegen/crm/objects/feedback_submissions/types/ObservableAPI.ts +++ b/codegen/crm/objects/feedback_submissions/types/ObservableAPI.ts @@ -2,20 +2,12 @@ import { ResponseContext, RequestContext, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; @@ -34,72 +26,6 @@ export class ObservableBasicApi { this.responseProcessor = responseProcessor || new BasicApiResponseProcessor(); } - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param feedbackSubmissionId - */ - public archiveWithHttpInfo(feedbackSubmissionId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.archive(feedbackSubmissionId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveWithHttpInfo(rsp))); - })); - } - - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param feedbackSubmissionId - */ - public archive(feedbackSubmissionId: string, _options?: Configuration): Observable { - return this.archiveWithHttpInfo(feedbackSubmissionId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public createWithHttpInfo(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.create(simplePublicObjectInputForCreate, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWithHttpInfo(rsp))); - })); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Observable { - return this.createWithHttpInfo(simplePublicObjectInputForCreate, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - /** * Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -108,7 +34,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(feedbackSubmissionId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(feedbackSubmissionId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +63,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(feedbackSubmissionId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(feedbackSubmissionId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -186,43 +112,6 @@ export class ObservableBasicApi { return this.getPageWithHttpInfo(limit, after, properties, propertiesWithHistory, associations, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param feedbackSubmissionId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public updateWithHttpInfo(feedbackSubmissionId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.update(feedbackSubmissionId, simplePublicObjectInput, idProperty, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWithHttpInfo(rsp))); - })); - } - - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param feedbackSubmissionId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public update(feedbackSubmissionId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { - return this.updateWithHttpInfo(feedbackSubmissionId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - } import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; @@ -241,68 +130,6 @@ export class ObservableBatchApi { this.responseProcessor = responseProcessor || new BatchApiResponseProcessor(); } - /** - * Archive a batch of feedback submissions by ID - * @param batchInputSimplePublicObjectId - */ - public archiveWithHttpInfo(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.archive(batchInputSimplePublicObjectId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveWithHttpInfo(rsp))); - })); - } - - /** - * Archive a batch of feedback submissions by ID - * @param batchInputSimplePublicObjectId - */ - public archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Observable { - return this.archiveWithHttpInfo(batchInputSimplePublicObjectId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Create a batch of feedback submissions - * @param batchInputSimplePublicObjectInputForCreate - */ - public createWithHttpInfo(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.create(batchInputSimplePublicObjectInputForCreate, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWithHttpInfo(rsp))); - })); - } - - /** - * Create a batch of feedback submissions - * @param batchInputSimplePublicObjectInputForCreate - */ - public create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Observable { - return this.createWithHttpInfo(batchInputSimplePublicObjectInputForCreate, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - /** * Read a batch of feedback submissions by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -336,137 +163,6 @@ export class ObservableBatchApi { return this.readWithHttpInfo(batchReadInputSimplePublicObjectId, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } - /** - * Update a batch of feedback submissions - * @param batchInputSimplePublicObjectBatchInput - */ - public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.update(batchInputSimplePublicObjectBatchInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWithHttpInfo(rsp))); - })); - } - - /** - * Update a batch of feedback submissions - * @param batchInputSimplePublicObjectBatchInput - */ - public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { - return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - - /** - * Merge two feedback submissions with same type - * @param publicMergeInput - */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); - })); - } - - /** - * Merge two feedback submissions with same type - * @param publicMergeInput - */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - } import { SearchApiRequestFactory, SearchApiResponseProcessor} from "../apis/SearchApi"; diff --git a/codegen/crm/objects/feedback_submissions/types/PromiseAPI.ts b/codegen/crm/objects/feedback_submissions/types/PromiseAPI.ts index e50615540..67904c3be 100644 --- a/codegen/crm/objects/feedback_submissions/types/PromiseAPI.ts +++ b/codegen/crm/objects/feedback_submissions/types/PromiseAPI.ts @@ -1,20 +1,12 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { ObservableBasicApi } from './ObservableAPI'; @@ -30,46 +22,6 @@ export class PromiseBasicApi { this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param feedbackSubmissionId - */ - public archiveWithHttpInfo(feedbackSubmissionId: string, _options?: Configuration): Promise> { - const result = this.api.archiveWithHttpInfo(feedbackSubmissionId, _options); - return result.toPromise(); - } - - /** - * Move an Object identified by `{feedbackSubmissionId}` to the recycling bin. - * Archive - * @param feedbackSubmissionId - */ - public archive(feedbackSubmissionId: string, _options?: Configuration): Promise { - const result = this.api.archive(feedbackSubmissionId, _options); - return result.toPromise(); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public createWithHttpInfo(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise> { - const result = this.api.createWithHttpInfo(simplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - - /** - * Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise { - const result = this.api.create(simplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - /** * Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -78,7 +30,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(feedbackSubmissionId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(feedbackSubmissionId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +45,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(feedbackSubmissionId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(feedbackSubmissionId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -130,30 +82,6 @@ export class PromiseBasicApi { return result.toPromise(); } - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param feedbackSubmissionId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public updateWithHttpInfo(feedbackSubmissionId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { - const result = this.api.updateWithHttpInfo(feedbackSubmissionId, simplePublicObjectInput, idProperty, _options); - return result.toPromise(); - } - - /** - * Perform a partial update of an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param feedbackSubmissionId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public update(feedbackSubmissionId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { - const result = this.api.update(feedbackSubmissionId, simplePublicObjectInput, idProperty, _options); - return result.toPromise(); - } - } @@ -173,42 +101,6 @@ export class PromiseBatchApi { this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); } - /** - * Archive a batch of feedback submissions by ID - * @param batchInputSimplePublicObjectId - */ - public archiveWithHttpInfo(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise> { - const result = this.api.archiveWithHttpInfo(batchInputSimplePublicObjectId, _options); - return result.toPromise(); - } - - /** - * Archive a batch of feedback submissions by ID - * @param batchInputSimplePublicObjectId - */ - public archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise { - const result = this.api.archive(batchInputSimplePublicObjectId, _options); - return result.toPromise(); - } - - /** - * Create a batch of feedback submissions - * @param batchInputSimplePublicObjectInputForCreate - */ - public createWithHttpInfo(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise> { - const result = this.api.createWithHttpInfo(batchInputSimplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - - /** - * Create a batch of feedback submissions - * @param batchInputSimplePublicObjectInputForCreate - */ - public create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise { - const result = this.api.create(batchInputSimplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - /** * Read a batch of feedback submissions by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -229,100 +121,6 @@ export class PromiseBatchApi { return result.toPromise(); } - /** - * Update a batch of feedback submissions - * @param batchInputSimplePublicObjectBatchInput - */ - public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { - const result = this.api.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options); - return result.toPromise(); - } - - /** - * Update a batch of feedback submissions - * @param batchInputSimplePublicObjectBatchInput - */ - public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { - const result = this.api.update(batchInputSimplePublicObjectBatchInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - - /** - * Merge two feedback submissions with same type - * @param publicMergeInput - */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); - return result.toPromise(); - } - - /** - * Merge two feedback submissions with same type - * @param publicMergeInput - */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); - return result.toPromise(); - } - } diff --git a/codegen/crm/objects/goals/apis/BasicApi.ts b/codegen/crm/objects/goals/apis/BasicApi.ts index 33f1b3c15..e594326a8 100644 --- a/codegen/crm/objects/goals/apis/BasicApi.ts +++ b/codegen/crm/objects/goals/apis/BasicApi.ts @@ -9,9 +9,6 @@ import {SecurityAuthentication} from '../auth/auth'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; /** @@ -19,80 +16,6 @@ import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObject */ export class BasicApiRequestFactory extends BaseAPIRequestFactory { - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param goalTargetId - */ - public async archive(goalTargetId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'goalTargetId' is not null or undefined - if (goalTargetId === null || goalTargetId === undefined) { - throw new RequiredError("BasicApi", "archive", "goalTargetId"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/{goalTargetId}' - .replace('{' + 'goalTargetId' + '}', encodeURIComponent(String(goalTargetId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public async create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'simplePublicObjectInputForCreate' is not null or undefined - if (simplePublicObjectInputForCreate === null || simplePublicObjectInputForCreate === undefined) { - throw new RequiredError("BasicApi", "create", "simplePublicObjectInputForCreate"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(simplePublicObjectInputForCreate, "SimplePublicObjectInputForCreate", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * Read an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -101,7 +24,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(goalTargetId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -151,6 +74,12 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { @@ -217,63 +146,12 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param goalTargetId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public async update(goalTargetId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'goalTargetId' is not null or undefined - if (goalTargetId === null || goalTargetId === undefined) { - throw new RequiredError("BasicApi", "update", "goalTargetId"); - } - - - // verify required parameter 'simplePublicObjectInput' is not null or undefined - if (simplePublicObjectInput === null || simplePublicObjectInput === undefined) { - throw new RequiredError("BasicApi", "update", "simplePublicObjectInput"); - } - - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/{goalTargetId}' - .replace('{' + 'goalTargetId' + '}', encodeURIComponent(String(goalTargetId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (idProperty !== undefined) { - requestContext.setQueryParam("idProperty", ObjectSerializer.serialize(idProperty, "string", "")); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(simplePublicObjectInput, "SimplePublicObjectInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { @@ -287,74 +165,6 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { export class BasicApiResponseProcessor { - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to create - * @throws ApiException if the response code was not in [200, 299] - */ - public async createWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("201", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -427,40 +237,4 @@ export class BasicApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - } diff --git a/codegen/crm/objects/goals/apis/BatchApi.ts b/codegen/crm/objects/goals/apis/BatchApi.ts index 0ac3000fd..93cc51f1c 100644 --- a/codegen/crm/objects/goals/apis/BatchApi.ts +++ b/codegen/crm/objects/goals/apis/BatchApi.ts @@ -8,9 +8,6 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -20,88 +17,6 @@ import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchRespon */ export class BatchApiRequestFactory extends BaseAPIRequestFactory { - /** - * Archive a batch of goal targets by ID - * @param batchInputSimplePublicObjectId - */ - public async archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectId' is not null or undefined - if (batchInputSimplePublicObjectId === null || batchInputSimplePublicObjectId === undefined) { - throw new RequiredError("BatchApi", "archive", "batchInputSimplePublicObjectId"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/batch/archive'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectId, "BatchInputSimplePublicObjectId", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Create a batch of goal targets - * @param batchInputSimplePublicObjectInputForCreate - */ - public async create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectInputForCreate' is not null or undefined - if (batchInputSimplePublicObjectInputForCreate === null || batchInputSimplePublicObjectInputForCreate === undefined) { - throw new RequiredError("BatchApi", "create", "batchInputSimplePublicObjectInputForCreate"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/batch/create'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectInputForCreate, "BatchInputSimplePublicObjectInputForCreate", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * Read a batch of goal targets by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -141,47 +56,12 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } - - return requestContext; - } - - /** - * Update a batch of goal targets - * @param batchInputSimplePublicObjectBatchInput - */ - public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputSimplePublicObjectBatchInput' is not null or undefined - if (batchInputSimplePublicObjectBatchInput === null || batchInputSimplePublicObjectBatchInput === undefined) { - throw new RequiredError("BatchApi", "update", "batchInputSimplePublicObjectBatchInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/batch/update'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInput, "BatchInputSimplePublicObjectBatchInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { @@ -195,81 +75,6 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { export class BatchApiResponseProcessor { - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to create - * @throws ApiException if the response code was not in [200, 299] - */ - public async createWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("201", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject", "" - ) as BatchResponseSimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("207", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -313,47 +118,4 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject", "" - ) as BatchResponseSimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("207", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - } diff --git a/codegen/crm/objects/goals/apis/GDPRApi.ts b/codegen/crm/objects/goals/apis/GDPRApi.ts deleted file mode 100644 index 1fdf5f56c..000000000 --- a/codegen/crm/objects/goals/apis/GDPRApi.ts +++ /dev/null @@ -1,96 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/goals/apis/PublicObjectApi.ts b/codegen/crm/objects/goals/apis/PublicObjectApi.ts deleted file mode 100644 index 47fd96dce..000000000 --- a/codegen/crm/objects/goals/apis/PublicObjectApi.ts +++ /dev/null @@ -1,100 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two goal targets with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/goal_targets/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/goals/apis/SearchApi.ts b/codegen/crm/objects/goals/apis/SearchApi.ts index feb4c3138..a9c39a175 100644 --- a/codegen/crm/objects/goals/apis/SearchApi.ts +++ b/codegen/crm/objects/goals/apis/SearchApi.ts @@ -47,6 +47,12 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { diff --git a/codegen/crm/objects/goals/index.ts b/codegen/crm/objects/goals/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/goals/index.ts +++ b/codegen/crm/objects/goals/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/goals/models/AssociationSpec.ts b/codegen/crm/objects/goals/models/AssociationSpec.ts deleted file mode 100644 index a9edd14f8..000000000 --- a/codegen/crm/objects/goals/models/AssociationSpec.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AssociationSpec { - 'associationCategory': AssociationSpecAssociationCategoryEnum; - 'associationTypeId': number; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "associationCategory", - "baseName": "associationCategory", - "type": "AssociationSpecAssociationCategoryEnum", - "format": "" - }, - { - "name": "associationTypeId", - "baseName": "associationTypeId", - "type": "number", - "format": "int32" - } ]; - - static getAttributeTypeMap() { - return AssociationSpec.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum AssociationSpecAssociationCategoryEnum { - HubspotDefined = 'HUBSPOT_DEFINED', - UserDefined = 'USER_DEFINED', - IntegratorDefined = 'INTEGRATOR_DEFINED' -} - diff --git a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectBatchInput.ts b/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectBatchInput.ts deleted file mode 100644 index 99bdedd87..000000000 --- a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectBatchInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; - -export class BatchInputSimplePublicObjectBatchInput { - 'inputs': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "inputs", - "baseName": "inputs", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return BatchInputSimplePublicObjectBatchInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectInputForCreate.ts b/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectInputForCreate.ts deleted file mode 100644 index 4f7909a65..000000000 --- a/codegen/crm/objects/goals/models/BatchInputSimplePublicObjectInputForCreate.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; - -export class BatchInputSimplePublicObjectInputForCreate { - 'inputs': Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "inputs", - "baseName": "inputs", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return BatchInputSimplePublicObjectInputForCreate.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/goals/models/BatchReadInputSimplePublicObjectId.ts index e13f73d53..6168567d5 100644 --- a/codegen/crm/objects/goals/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/goals/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/goals/models/ObjectSerializer.ts b/codegen/crm/objects/goals/models/ObjectSerializer.ts index 78bbe565d..65c68aa7f 100644 --- a/codegen/crm/objects/goals/models/ObjectSerializer.ts +++ b/codegen/crm/objects/goals/models/ObjectSerializer.ts @@ -1,8 +1,4 @@ export * from '../models/AssociatedId'; -export * from '../models/AssociationSpec'; -export * from '../models/BatchInputSimplePublicObjectBatchInput'; -export * from '../models/BatchInputSimplePublicObjectId'; -export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -17,25 +13,14 @@ export * from '../models/ModelError'; export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; -export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; -export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; -export * from '../models/SimplePublicObjectBatchInput'; export * from '../models/SimplePublicObjectId'; -export * from '../models/SimplePublicObjectInput'; -export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; -import { AssociationSpec } from '../models/AssociationSpec'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; @@ -50,16 +35,9 @@ import { ModelError } from '../models/ModelError'; import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; -import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -77,7 +55,6 @@ let primitives = [ ]; let enumsMap: Set = new Set([ - "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", "FilterOperatorEnum", @@ -85,10 +62,6 @@ let enumsMap: Set = new Set([ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, - "AssociationSpec": AssociationSpec, - "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, - "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, - "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, @@ -103,16 +76,9 @@ let typeMap: {[index: string]: any} = { "NextPage": NextPage, "Paging": Paging, "PreviousPage": PreviousPage, - "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, - "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, - "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, "SimplePublicObjectId": SimplePublicObjectId, - "SimplePublicObjectInput": SimplePublicObjectInput, - "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, diff --git a/codegen/crm/objects/goals/models/PublicAssociationsForObject.ts b/codegen/crm/objects/goals/models/PublicAssociationsForObject.ts deleted file mode 100644 index 7e51f799f..000000000 --- a/codegen/crm/objects/goals/models/PublicAssociationsForObject.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AssociationSpec } from '../models/AssociationSpec'; -import { PublicObjectId } from '../models/PublicObjectId'; - -export class PublicAssociationsForObject { - 'types': Array; - 'to': PublicObjectId; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "types", - "baseName": "types", - "type": "Array", - "format": "" - }, - { - "name": "to", - "baseName": "to", - "type": "PublicObjectId", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicAssociationsForObject.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/goals/models/PublicGdprDeleteInput.ts deleted file mode 100644 index 9b8b11996..000000000 --- a/codegen/crm/objects/goals/models/PublicGdprDeleteInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/PublicMergeInput.ts b/codegen/crm/objects/goals/models/PublicMergeInput.ts deleted file mode 100644 index 4e1f36eab..000000000 --- a/codegen/crm/objects/goals/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/PublicObjectId.ts b/codegen/crm/objects/goals/models/PublicObjectId.ts deleted file mode 100644 index 5d85a782c..000000000 --- a/codegen/crm/objects/goals/models/PublicObjectId.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicObjectId { - 'id': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicObjectId.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/goals/models/PublicObjectSearchRequest.ts index c5f64b231..64cfc2e34 100644 --- a/codegen/crm/objects/goals/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/goals/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/goals/models/SimplePublicObjectInput.ts b/codegen/crm/objects/goals/models/SimplePublicObjectInput.ts deleted file mode 100644 index d2ac86cb4..000000000 --- a/codegen/crm/objects/goals/models/SimplePublicObjectInput.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class SimplePublicObjectInput { - 'properties': { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SimplePublicObjectInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/goals/models/SimplePublicObjectInputForCreate.ts deleted file mode 100644 index 228776b8d..000000000 --- a/codegen/crm/objects/goals/models/SimplePublicObjectInputForCreate.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Goal Targets - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; - -export class SimplePublicObjectInputForCreate { - 'associations': Array; - 'properties': { [key: string]: string; }; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "associations", - "baseName": "associations", - "type": "Array", - "format": "" - }, - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: string; }", - "format": "" - } ]; - - static getAttributeTypeMap() { - return SimplePublicObjectInputForCreate.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/goals/models/all.ts b/codegen/crm/objects/goals/models/all.ts index 16a8dee1d..d63b41619 100644 --- a/codegen/crm/objects/goals/models/all.ts +++ b/codegen/crm/objects/goals/models/all.ts @@ -1,8 +1,4 @@ export * from '../models/AssociatedId' -export * from '../models/AssociationSpec' -export * from '../models/BatchInputSimplePublicObjectBatchInput' -export * from '../models/BatchInputSimplePublicObjectId' -export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' @@ -17,16 +13,9 @@ export * from '../models/ModelError' export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' -export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' -export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' -export * from '../models/SimplePublicObjectBatchInput' export * from '../models/SimplePublicObjectId' -export * from '../models/SimplePublicObjectInput' -export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/goals/types/ObjectParamAPI.ts b/codegen/crm/objects/goals/types/ObjectParamAPI.ts index b24be976f..39fb76c3e 100644 --- a/codegen/crm/objects/goals/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/goals/types/ObjectParamAPI.ts @@ -1,43 +1,17 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { ObservableBasicApi } from "./ObservableAPI"; import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; -export interface BasicApiArchiveRequest { - /** - * - * @type string - * @memberof BasicApiarchive - */ - goalTargetId: string -} - -export interface BasicApiCreateRequest { - /** - * - * @type SimplePublicObjectInputForCreate - * @memberof BasicApicreate - */ - simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate -} - export interface BasicApiGetByIdRequest { /** * @@ -70,7 +44,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -116,27 +90,6 @@ export interface BasicApiGetPageRequest { archived?: boolean } -export interface BasicApiUpdateRequest { - /** - * - * @type string - * @memberof BasicApiupdate - */ - goalTargetId: string - /** - * - * @type SimplePublicObjectInput - * @memberof BasicApiupdate - */ - simplePublicObjectInput: SimplePublicObjectInput - /** - * The name of a property whose values are unique for this object type - * @type string - * @memberof BasicApiupdate - */ - idProperty?: string -} - export class ObjectBasicApi { private api: ObservableBasicApi @@ -144,42 +97,6 @@ export class ObjectBasicApi { this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param param the request object - */ - public archiveWithHttpInfo(param: BasicApiArchiveRequest, options?: Configuration): Promise> { - return this.api.archiveWithHttpInfo(param.goalTargetId, options).toPromise(); - } - - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param param the request object - */ - public archive(param: BasicApiArchiveRequest, options?: Configuration): Promise { - return this.api.archive(param.goalTargetId, options).toPromise(); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param param the request object - */ - public createWithHttpInfo(param: BasicApiCreateRequest, options?: Configuration): Promise> { - return this.api.createWithHttpInfo(param.simplePublicObjectInputForCreate, options).toPromise(); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param param the request object - */ - public create(param: BasicApiCreateRequest, options?: Configuration): Promise { - return this.api.create(param.simplePublicObjectInputForCreate, options).toPromise(); - } - /** * Read an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -216,47 +133,11 @@ export class ObjectBasicApi { return this.api.getPage(param.limit, param.after, param.properties, param.propertiesWithHistory, param.associations, param.archived, options).toPromise(); } - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param param the request object - */ - public updateWithHttpInfo(param: BasicApiUpdateRequest, options?: Configuration): Promise> { - return this.api.updateWithHttpInfo(param.goalTargetId, param.simplePublicObjectInput, param.idProperty, options).toPromise(); - } - - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param param the request object - */ - public update(param: BasicApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.goalTargetId, param.simplePublicObjectInput, param.idProperty, options).toPromise(); - } - } import { ObservableBatchApi } from "./ObservableAPI"; import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; -export interface BatchApiArchiveRequest { - /** - * - * @type BatchInputSimplePublicObjectId - * @memberof BatchApiarchive - */ - batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId -} - -export interface BatchApiCreateRequest { - /** - * - * @type BatchInputSimplePublicObjectInputForCreate - * @memberof BatchApicreate - */ - batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate -} - export interface BatchApiReadRequest { /** * @@ -272,15 +153,6 @@ export interface BatchApiReadRequest { archived?: boolean } -export interface BatchApiUpdateRequest { - /** - * - * @type BatchInputSimplePublicObjectBatchInput - * @memberof BatchApiupdate - */ - batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput -} - export class ObjectBatchApi { private api: ObservableBatchApi @@ -288,38 +160,6 @@ export class ObjectBatchApi { this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); } - /** - * Archive a batch of goal targets by ID - * @param param the request object - */ - public archiveWithHttpInfo(param: BatchApiArchiveRequest, options?: Configuration): Promise> { - return this.api.archiveWithHttpInfo(param.batchInputSimplePublicObjectId, options).toPromise(); - } - - /** - * Archive a batch of goal targets by ID - * @param param the request object - */ - public archive(param: BatchApiArchiveRequest, options?: Configuration): Promise { - return this.api.archive(param.batchInputSimplePublicObjectId, options).toPromise(); - } - - /** - * Create a batch of goal targets - * @param param the request object - */ - public createWithHttpInfo(param: BatchApiCreateRequest, options?: Configuration): Promise> { - return this.api.createWithHttpInfo(param.batchInputSimplePublicObjectInputForCreate, options).toPromise(); - } - - /** - * Create a batch of goal targets - * @param param the request object - */ - public create(param: BatchApiCreateRequest, options?: Configuration): Promise { - return this.api.create(param.batchInputSimplePublicObjectInputForCreate, options).toPromise(); - } - /** * Read a batch of goal targets by internal ID, or unique property values * @param param the request object @@ -336,98 +176,6 @@ export class ObjectBatchApi { return this.api.read(param.batchReadInputSimplePublicObjectId, param.archived, options).toPromise(); } - /** - * Update a batch of goal targets - * @param param the request object - */ - public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { - return this.api.updateWithHttpInfo(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); - } - - /** - * Update a batch of goal targets - * @param param the request object - */ - public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); - } - -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - - /** - * Merge two goal targets with same type - * @param param the request object - */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); - } - - /** - * Merge two goal targets with same type - * @param param the request object - */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); - } - } import { ObservableSearchApi } from "./ObservableAPI"; diff --git a/codegen/crm/objects/goals/types/ObservableAPI.ts b/codegen/crm/objects/goals/types/ObservableAPI.ts index 32f450397..128e68567 100644 --- a/codegen/crm/objects/goals/types/ObservableAPI.ts +++ b/codegen/crm/objects/goals/types/ObservableAPI.ts @@ -2,20 +2,12 @@ import { ResponseContext, RequestContext, HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; @@ -34,72 +26,6 @@ export class ObservableBasicApi { this.responseProcessor = responseProcessor || new BasicApiResponseProcessor(); } - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param goalTargetId - */ - public archiveWithHttpInfo(goalTargetId: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.archive(goalTargetId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveWithHttpInfo(rsp))); - })); - } - - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param goalTargetId - */ - public archive(goalTargetId: string, _options?: Configuration): Observable { - return this.archiveWithHttpInfo(goalTargetId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public createWithHttpInfo(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.create(simplePublicObjectInputForCreate, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWithHttpInfo(rsp))); - })); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Observable { - return this.createWithHttpInfo(simplePublicObjectInputForCreate, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - /** * Read an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -108,7 +34,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(goalTargetId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(goalTargetId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +63,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(goalTargetId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(goalTargetId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -186,43 +112,6 @@ export class ObservableBasicApi { return this.getPageWithHttpInfo(limit, after, properties, propertiesWithHistory, associations, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param goalTargetId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public updateWithHttpInfo(goalTargetId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.update(goalTargetId, simplePublicObjectInput, idProperty, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWithHttpInfo(rsp))); - })); - } - - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param goalTargetId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public update(goalTargetId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { - return this.updateWithHttpInfo(goalTargetId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - } import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; @@ -241,68 +130,6 @@ export class ObservableBatchApi { this.responseProcessor = responseProcessor || new BatchApiResponseProcessor(); } - /** - * Archive a batch of goal targets by ID - * @param batchInputSimplePublicObjectId - */ - public archiveWithHttpInfo(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.archive(batchInputSimplePublicObjectId, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveWithHttpInfo(rsp))); - })); - } - - /** - * Archive a batch of goal targets by ID - * @param batchInputSimplePublicObjectId - */ - public archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Observable { - return this.archiveWithHttpInfo(batchInputSimplePublicObjectId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Create a batch of goal targets - * @param batchInputSimplePublicObjectInputForCreate - */ - public createWithHttpInfo(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.create(batchInputSimplePublicObjectInputForCreate, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createWithHttpInfo(rsp))); - })); - } - - /** - * Create a batch of goal targets - * @param batchInputSimplePublicObjectInputForCreate - */ - public create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Observable { - return this.createWithHttpInfo(batchInputSimplePublicObjectInputForCreate, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - /** * Read a batch of goal targets by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -336,137 +163,6 @@ export class ObservableBatchApi { return this.readWithHttpInfo(batchReadInputSimplePublicObjectId, archived, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } - /** - * Update a batch of goal targets - * @param batchInputSimplePublicObjectBatchInput - */ - public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.update(batchInputSimplePublicObjectBatchInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateWithHttpInfo(rsp))); - })); - } - - /** - * Update a batch of goal targets - * @param batchInputSimplePublicObjectBatchInput - */ - public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { - return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - - /** - * Merge two goal targets with same type - * @param publicMergeInput - */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); - })); - } - - /** - * Merge two goal targets with same type - * @param publicMergeInput - */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - } import { SearchApiRequestFactory, SearchApiResponseProcessor} from "../apis/SearchApi"; diff --git a/codegen/crm/objects/goals/types/PromiseAPI.ts b/codegen/crm/objects/goals/types/PromiseAPI.ts index a33776428..18defff80 100644 --- a/codegen/crm/objects/goals/types/PromiseAPI.ts +++ b/codegen/crm/objects/goals/types/PromiseAPI.ts @@ -1,20 +1,12 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' -import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; -import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; -import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; -import { SimplePublicObject } from '../models/SimplePublicObject'; -import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; -import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; import { ObservableBasicApi } from './ObservableAPI'; @@ -30,46 +22,6 @@ export class PromiseBasicApi { this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param goalTargetId - */ - public archiveWithHttpInfo(goalTargetId: string, _options?: Configuration): Promise> { - const result = this.api.archiveWithHttpInfo(goalTargetId, _options); - return result.toPromise(); - } - - /** - * Move an Object identified by `{goalTargetId}` to the recycling bin. - * Archive - * @param goalTargetId - */ - public archive(goalTargetId: string, _options?: Configuration): Promise { - const result = this.api.archive(goalTargetId, _options); - return result.toPromise(); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public createWithHttpInfo(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise> { - const result = this.api.createWithHttpInfo(simplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - - /** - * Create a goal target with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard goal targets is provided. - * Create - * @param simplePublicObjectInputForCreate - */ - public create(simplePublicObjectInputForCreate: SimplePublicObjectInputForCreate, _options?: Configuration): Promise { - const result = this.api.create(simplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - /** * Read an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param. * Read @@ -78,7 +30,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(goalTargetId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(goalTargetId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +45,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(goalTargetId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(goalTargetId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -130,30 +82,6 @@ export class PromiseBasicApi { return result.toPromise(); } - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param goalTargetId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public updateWithHttpInfo(goalTargetId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { - const result = this.api.updateWithHttpInfo(goalTargetId, simplePublicObjectInput, idProperty, _options); - return result.toPromise(); - } - - /** - * Perform a partial update of an Object identified by `{goalTargetId}`. `{goalTargetId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. - * Update - * @param goalTargetId - * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type - */ - public update(goalTargetId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { - const result = this.api.update(goalTargetId, simplePublicObjectInput, idProperty, _options); - return result.toPromise(); - } - } @@ -173,42 +101,6 @@ export class PromiseBatchApi { this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); } - /** - * Archive a batch of goal targets by ID - * @param batchInputSimplePublicObjectId - */ - public archiveWithHttpInfo(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise> { - const result = this.api.archiveWithHttpInfo(batchInputSimplePublicObjectId, _options); - return result.toPromise(); - } - - /** - * Archive a batch of goal targets by ID - * @param batchInputSimplePublicObjectId - */ - public archive(batchInputSimplePublicObjectId: BatchInputSimplePublicObjectId, _options?: Configuration): Promise { - const result = this.api.archive(batchInputSimplePublicObjectId, _options); - return result.toPromise(); - } - - /** - * Create a batch of goal targets - * @param batchInputSimplePublicObjectInputForCreate - */ - public createWithHttpInfo(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise> { - const result = this.api.createWithHttpInfo(batchInputSimplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - - /** - * Create a batch of goal targets - * @param batchInputSimplePublicObjectInputForCreate - */ - public create(batchInputSimplePublicObjectInputForCreate: BatchInputSimplePublicObjectInputForCreate, _options?: Configuration): Promise { - const result = this.api.create(batchInputSimplePublicObjectInputForCreate, _options); - return result.toPromise(); - } - /** * Read a batch of goal targets by internal ID, or unique property values * @param batchReadInputSimplePublicObjectId @@ -229,100 +121,6 @@ export class PromiseBatchApi { return result.toPromise(); } - /** - * Update a batch of goal targets - * @param batchInputSimplePublicObjectBatchInput - */ - public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { - const result = this.api.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options); - return result.toPromise(); - } - - /** - * Update a batch of goal targets - * @param batchInputSimplePublicObjectBatchInput - */ - public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { - const result = this.api.update(batchInputSimplePublicObjectBatchInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - - /** - * Merge two goal targets with same type - * @param publicMergeInput - */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); - return result.toPromise(); - } - - /** - * Merge two goal targets with same type - * @param publicMergeInput - */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); - return result.toPromise(); - } - } From 89def7cd25f9492f740a2521eb8466beaff96c1a Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 18:17:37 +0300 Subject: [PATCH 16/46] Update discoveries: CRM Calls, Emails, Feedback Submissions, Communications and Goals --- src/discovery/crm/objects/calls/CallsDiscovery.ts | 6 ------ .../communications/CommunicationsDiscovery.ts | 6 ------ src/discovery/crm/objects/emails/EmailsDiscovery.ts | 6 ------ .../FeedbackSubmissionsDiscovery.ts | 4 ---- src/discovery/crm/objects/goals/GoalsDiscovery.ts | 6 ------ test/spec/crm/objects/calls/calls.spec.ts | 6 +----- .../objects/communications/communications.spec.ts | 12 +----------- test/spec/crm/objects/emails/emails.spec.ts | 12 +----------- .../feedback_submissions.spec.ts | 12 +----------- test/spec/crm/objects/goals/goals.spec.ts | 6 +----- 10 files changed, 5 insertions(+), 71 deletions(-) diff --git a/src/discovery/crm/objects/calls/CallsDiscovery.ts b/src/discovery/crm/objects/calls/CallsDiscovery.ts index 0a43d8f87..be31dd09a 100644 --- a/src/discovery/crm/objects/calls/CallsDiscovery.ts +++ b/src/discovery/crm/objects/calls/CallsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/calls/co import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class CallsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class CallsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/communications/CommunicationsDiscovery.ts b/src/discovery/crm/objects/communications/CommunicationsDiscovery.ts index fadc15b6a..dace72a22 100644 --- a/src/discovery/crm/objects/communications/CommunicationsDiscovery.ts +++ b/src/discovery/crm/objects/communications/CommunicationsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/communic import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class CommunicationsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class CommunicationsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/emails/EmailsDiscovery.ts b/src/discovery/crm/objects/emails/EmailsDiscovery.ts index 9dcf03140..d2e7e99e2 100644 --- a/src/discovery/crm/objects/emails/EmailsDiscovery.ts +++ b/src/discovery/crm/objects/emails/EmailsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/emails/c import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class EmailsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class EmailsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts b/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts index 7a019ef43..99d58c141 100644 --- a/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts +++ b/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/feedback import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class FeedbackSubmissionsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { diff --git a/src/discovery/crm/objects/goals/GoalsDiscovery.ts b/src/discovery/crm/objects/goals/GoalsDiscovery.ts index 1f3855224..0153325fb 100644 --- a/src/discovery/crm/objects/goals/GoalsDiscovery.ts +++ b/src/discovery/crm/objects/goals/GoalsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/goals/co import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class GoalsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class GoalsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/test/spec/crm/objects/calls/calls.spec.ts b/test/spec/crm/objects/calls/calls.spec.ts index 230fda793..bbdb47224 100644 --- a/test/spec/crm/objects/calls/calls.spec.ts +++ b/test/spec/crm/objects/calls/calls.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../../codegen/crm/objects/calls/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/calls/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/communications/communications.spec.ts b/test/spec/crm/objects/communications/communications.spec.ts index d911e76e5..e278ffc21 100644 --- a/test/spec/crm/objects/communications/communications.spec.ts +++ b/test/spec/crm/objects/communications/communications.spec.ts @@ -1,10 +1,4 @@ -import { - BasicApi, - BatchApi, - GDPRApi, - PublicObjectApi, - SearchApi, -} from '../../../../../codegen/crm/objects/communications/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/communications/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -14,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/emails/emails.spec.ts b/test/spec/crm/objects/emails/emails.spec.ts index bc09e4c66..cfc553bf6 100644 --- a/test/spec/crm/objects/emails/emails.spec.ts +++ b/test/spec/crm/objects/emails/emails.spec.ts @@ -1,10 +1,4 @@ -import { - BasicApi, - BatchApi, - GDPRApi, - PublicObjectApi, - SearchApi, -} from '../../../../../codegen/crm/objects/emails/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/emails/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -14,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/feedback_submissions/feedback_submissions.spec.ts b/test/spec/crm/objects/feedback_submissions/feedback_submissions.spec.ts index 53d3d735f..164c3dd9c 100644 --- a/test/spec/crm/objects/feedback_submissions/feedback_submissions.spec.ts +++ b/test/spec/crm/objects/feedback_submissions/feedback_submissions.spec.ts @@ -1,10 +1,4 @@ -import { - BasicApi, - BatchApi, - GDPRApi, - PublicObjectApi, - SearchApi, -} from '../../../../../codegen/crm/objects/feedback_submissions/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/feedback_submissions/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -14,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/goals/goals.spec.ts b/test/spec/crm/objects/goals/goals.spec.ts index 4c786c096..e46e7fc74 100644 --- a/test/spec/crm/objects/goals/goals.spec.ts +++ b/test/spec/crm/objects/goals/goals.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../../codegen/crm/objects/goals/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/goals/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From 1399a4c89041ea3da7958030b9142a3943a24319 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Tue, 10 Sep 2024 18:20:27 +0300 Subject: [PATCH 17/46] Fix CRM Feedback Submissions --- .../feedback_submissions/FeedbackSubmissionsDiscovery.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts b/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts index 99d58c141..a2c805070 100644 --- a/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts +++ b/src/discovery/crm/objects/feedback_submissions/FeedbackSubmissionsDiscovery.ts @@ -30,8 +30,6 @@ export default class FeedbackSubmissionsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } From b8a5de3a43823af1e7b14e953c2e233226ba45a4 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 10:34:57 +0300 Subject: [PATCH 18/46] Codegen: CRM Lead, Meetings and Notes --- codegen/crm/objects/leads/apis/BatchApi.ts | 24 ++-- .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../objects/leads/models/ObjectSerializer.ts | 11 ++ .../leads/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 7 ++ .../SimplePublicObjectBatchInputUpsert.ts | 7 ++ .../leads/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../leads/models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/leads/models/all.ts | 3 + .../crm/objects/leads/types/ObjectParamAPI.ts | 10 +- .../crm/objects/leads/types/ObservableAPI.ts | 12 +- codegen/crm/objects/leads/types/PromiseAPI.ts | 10 +- codegen/crm/objects/meetings/apis/BatchApi.ts | 96 +++++++++++++++- codegen/crm/objects/meetings/apis/GDPRApi.ts | 102 ----------------- .../objects/meetings/apis/PublicObjectApi.ts | 106 ------------------ codegen/crm/objects/meetings/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../meetings/models/ObjectSerializer.ts | 23 +++- .../meetings/models/PublicMergeInput.ts | 41 ------- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/meetings/models/all.ts | 7 +- .../objects/meetings/types/ObjectParamAPI.ts | 92 ++++----------- .../objects/meetings/types/ObservableAPI.ts | 98 +++------------- .../crm/objects/meetings/types/PromiseAPI.ts | 85 +++----------- codegen/crm/objects/notes/apis/BatchApi.ts | 96 +++++++++++++++- codegen/crm/objects/notes/apis/GDPRApi.ts | 102 ----------------- .../crm/objects/notes/apis/PublicObjectApi.ts | 106 ------------------ codegen/crm/objects/notes/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../objects/notes/models/ObjectSerializer.ts | 23 +++- .../objects/notes/models/PublicMergeInput.ts | 41 ------- .../notes/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../notes/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../notes/models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/notes/models/all.ts | 7 +- .../crm/objects/notes/types/ObjectParamAPI.ts | 92 ++++----------- .../crm/objects/notes/types/ObservableAPI.ts | 98 +++------------- codegen/crm/objects/notes/types/PromiseAPI.ts | 85 +++----------- 54 files changed, 1386 insertions(+), 1027 deletions(-) create mode 100644 codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts create mode 100644 codegen/crm/objects/leads/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/meetings/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/meetings/apis/PublicObjectApi.ts rename codegen/crm/objects/meetings/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/meetings/models/PublicMergeInput.ts create mode 100644 codegen/crm/objects/meetings/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/objects/meetings/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/notes/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/notes/apis/PublicObjectApi.ts rename codegen/crm/objects/notes/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/notes/models/PublicMergeInput.ts create mode 100644 codegen/crm/objects/notes/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/objects/notes/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/objects/leads/apis/BatchApi.ts b/codegen/crm/objects/leads/apis/BatchApi.ts index 8c3e4ef09..d8ed0af72 100644 --- a/codegen/crm/objects/leads/apis/BatchApi.ts +++ b/codegen/crm/objects/leads/apis/BatchApi.ts @@ -15,6 +15,8 @@ import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInput import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -217,7 +219,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param batchInputSimplePublicObjectBatchInputUpsert */ @@ -436,20 +438,20 @@ export class BatchApiResponseProcessor { * @params response Response returned by the server for a request to upsert * @throws ApiException if the response code was not in [200, 299] */ - public async upsertWithHttpInfo(response: ResponseContext): Promise> { + public async upsertWithHttpInfo(response: ResponseContext): Promise> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObject = ObjectSerializer.deserialize( + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject", "" - ) as BatchResponseSimplePublicObject; + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("207", response.httpStatusCode)) { - const body: BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObjectWithErrors; + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } if (isCodeInRange("0", response.httpStatusCode)) { @@ -462,10 +464,10 @@ export class BatchApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors = ObjectSerializer.deserialize( + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors", "" - ) as BatchResponseSimplePublicObject | BatchResponseSimplePublicObjectWithErrors; + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } diff --git a/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..a47b4e551 --- /dev/null +++ b/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Leads + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..a2ff283cb --- /dev/null +++ b/codegen/crm/objects/leads/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Leads + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/leads/models/ObjectSerializer.ts b/codegen/crm/objects/leads/models/ObjectSerializer.ts index 75354ffcc..78b31f8f7 100644 --- a/codegen/crm/objects/leads/models/ObjectSerializer.ts +++ b/codegen/crm/objects/leads/models/ObjectSerializer.ts @@ -7,6 +7,8 @@ export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -28,6 +30,7 @@ export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; @@ -40,6 +43,8 @@ import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInput import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -61,6 +66,7 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -93,6 +101,8 @@ let typeMap: {[index: string]: any} = { "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -114,6 +124,7 @@ let typeMap: {[index: string]: any} = { "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/leads/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/leads/models/PublicObjectSearchRequest.ts index bf7dfe09e..8ee298779 100644 --- a/codegen/crm/objects/leads/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/leads/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/leads/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/leads/models/SimplePublicObjectBatchInput.ts index adf73ee49..93a1c3483 100644 --- a/codegen/crm/objects/leads/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/leads/models/SimplePublicObjectBatchInput.ts @@ -16,6 +16,7 @@ export class SimplePublicObjectBatchInput { * The name of a property whose values are unique for this object */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; /** * The id to be updated. This can be the object id, or the unique property value of the idProperty property */ @@ -31,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/leads/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/leads/models/SimplePublicObjectBatchInputUpsert.ts index 9316b2784..853433219 100644 --- a/codegen/crm/objects/leads/models/SimplePublicObjectBatchInputUpsert.ts +++ b/codegen/crm/objects/leads/models/SimplePublicObjectBatchInputUpsert.ts @@ -16,6 +16,7 @@ export class SimplePublicObjectBatchInputUpsert { * The name of a property whose values are unique for this object */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; 'id': string; 'properties': { [key: string]: string; }; @@ -28,6 +29,12 @@ export class SimplePublicObjectBatchInputUpsert { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/leads/models/SimplePublicObjectInput.ts b/codegen/crm/objects/leads/models/SimplePublicObjectInput.ts index 5e193c1a4..d37178610 100644 --- a/codegen/crm/objects/leads/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/leads/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/leads/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/leads/models/SimplePublicObjectInputForCreate.ts index a93f70873..e7ca21fc9 100644 --- a/codegen/crm/objects/leads/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/leads/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/leads/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/leads/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..0240ff59c --- /dev/null +++ b/codegen/crm/objects/leads/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Leads + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/leads/models/all.ts b/codegen/crm/objects/leads/models/all.ts index e00b9449f..d6ec2bc65 100644 --- a/codegen/crm/objects/leads/models/all.ts +++ b/codegen/crm/objects/leads/models/all.ts @@ -7,6 +7,8 @@ export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -28,5 +30,6 @@ export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/leads/types/ObjectParamAPI.ts b/codegen/crm/objects/leads/types/ObjectParamAPI.ts index a10a8c7e9..10b9a84e0 100644 --- a/codegen/crm/objects/leads/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/leads/types/ObjectParamAPI.ts @@ -8,6 +8,8 @@ import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInput import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; @@ -361,20 +363,20 @@ export class ObjectBatchApi { } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param param the request object */ - public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param param the request object */ - public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } diff --git a/codegen/crm/objects/leads/types/ObservableAPI.ts b/codegen/crm/objects/leads/types/ObservableAPI.ts index 265401265..90d442eaf 100644 --- a/codegen/crm/objects/leads/types/ObservableAPI.ts +++ b/codegen/crm/objects/leads/types/ObservableAPI.ts @@ -9,6 +9,8 @@ import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInput import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; @@ -367,11 +369,11 @@ export class ObservableBatchApi { } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param batchInputSimplePublicObjectBatchInputUpsert */ - public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain @@ -391,12 +393,12 @@ export class ObservableBatchApi { } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param batchInputSimplePublicObjectBatchInputUpsert */ - public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { - return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/leads/types/PromiseAPI.ts b/codegen/crm/objects/leads/types/PromiseAPI.ts index 563934411..7e66a0e3e 100644 --- a/codegen/crm/objects/leads/types/PromiseAPI.ts +++ b/codegen/crm/objects/leads/types/PromiseAPI.ts @@ -8,6 +8,8 @@ import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInput import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; @@ -247,21 +249,21 @@ export class PromiseBatchApi { } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param batchInputSimplePublicObjectBatchInputUpsert */ - public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Create or update records identified by `{leadsId}` or optionally a unique property value as specified by the `idProperty` query param. `{leadsId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. * Create or update a batch of leads by unique property values * @param batchInputSimplePublicObjectBatchInputUpsert */ - public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/meetings/apis/BatchApi.ts b/codegen/crm/objects/meetings/apis/BatchApi.ts index 11da25cd7..00ec77906 100644 --- a/codegen/crm/objects/meetings/apis/BatchApi.ts +++ b/codegen/crm/objects/meetings/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/meetings/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/meetings/apis/GDPRApi.ts b/codegen/crm/objects/meetings/apis/GDPRApi.ts deleted file mode 100644 index 88855eac3..000000000 --- a/codegen/crm/objects/meetings/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/meetings/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/meetings/apis/PublicObjectApi.ts b/codegen/crm/objects/meetings/apis/PublicObjectApi.ts deleted file mode 100644 index 616317c6e..000000000 --- a/codegen/crm/objects/meetings/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two meetings with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/meetings/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/meetings/index.ts b/codegen/crm/objects/meetings/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/meetings/index.ts +++ b/codegen/crm/objects/meetings/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/meetings/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/meetings/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/objects/meetings/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/meetings/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index e396f4c26..cff6cd996 100644 --- a/codegen/crm/objects/meetings/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/meetings/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/meetings/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/meetings/models/BatchReadInputSimplePublicObjectId.ts index 6eda35ec7..b366ade47 100644 --- a/codegen/crm/objects/meetings/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/meetings/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..c5de3f41e --- /dev/null +++ b/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Meetings + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..cc2fc9912 --- /dev/null +++ b/codegen/crm/objects/meetings/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Meetings + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/meetings/models/ObjectSerializer.ts b/codegen/crm/objects/meetings/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/meetings/models/ObjectSerializer.ts +++ b/codegen/crm/objects/meetings/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/meetings/models/PublicMergeInput.ts b/codegen/crm/objects/meetings/models/PublicMergeInput.ts deleted file mode 100644 index 81aafc108..000000000 --- a/codegen/crm/objects/meetings/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Meetings - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/meetings/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/meetings/models/PublicObjectSearchRequest.ts index 3355500ff..673660c55 100644 --- a/codegen/crm/objects/meetings/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/meetings/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInput.ts index 4e3b395ba..86cb25561 100644 --- a/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..532fef68d --- /dev/null +++ b/codegen/crm/objects/meetings/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Meetings + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/meetings/models/SimplePublicObjectInput.ts b/codegen/crm/objects/meetings/models/SimplePublicObjectInput.ts index 0c125fa91..a508b5fbc 100644 --- a/codegen/crm/objects/meetings/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/meetings/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/meetings/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/meetings/models/SimplePublicObjectInputForCreate.ts index 00d38eb70..76c0c1717 100644 --- a/codegen/crm/objects/meetings/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/meetings/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/meetings/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/meetings/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..70d5cbb6d --- /dev/null +++ b/codegen/crm/objects/meetings/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Meetings + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/meetings/models/all.ts b/codegen/crm/objects/meetings/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/meetings/models/all.ts +++ b/codegen/crm/objects/meetings/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/meetings/types/ObjectParamAPI.ts b/codegen/crm/objects/meetings/types/ObjectParamAPI.ts index 0576896d3..d52b47127 100644 --- a/codegen/crm/objects/meetings/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/meetings/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two meetings with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two meetings with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/meetings/types/ObservableAPI.ts b/codegen/crm/objects/meetings/types/ObservableAPI.ts index 69d20241e..51937d1cd 100644 --- a/codegen/crm/objects/meetings/types/ObservableAPI.ts +++ b/codegen/crm/objects/meetings/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two meetings with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two meetings with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/meetings/types/PromiseAPI.ts b/codegen/crm/objects/meetings/types/PromiseAPI.ts index e5c5b67b4..89056e98d 100644 --- a/codegen/crm/objects/meetings/types/PromiseAPI.ts +++ b/codegen/crm/objects/meetings/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of meetings + * Update a batch of meetings by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two meetings with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two meetings with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of meetings by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/notes/apis/BatchApi.ts b/codegen/crm/objects/notes/apis/BatchApi.ts index f0a5285b6..67556bc11 100644 --- a/codegen/crm/objects/notes/apis/BatchApi.ts +++ b/codegen/crm/objects/notes/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/notes/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/notes/apis/GDPRApi.ts b/codegen/crm/objects/notes/apis/GDPRApi.ts deleted file mode 100644 index 75215c9e1..000000000 --- a/codegen/crm/objects/notes/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/notes/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/notes/apis/PublicObjectApi.ts b/codegen/crm/objects/notes/apis/PublicObjectApi.ts deleted file mode 100644 index 83959da5b..000000000 --- a/codegen/crm/objects/notes/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two notes with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/notes/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/notes/index.ts b/codegen/crm/objects/notes/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/notes/index.ts +++ b/codegen/crm/objects/notes/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/notes/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/notes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/objects/notes/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/notes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 5449e84fc..6ddfd68df 100644 --- a/codegen/crm/objects/notes/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/notes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/notes/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/notes/models/BatchReadInputSimplePublicObjectId.ts index dc54fe19f..615101ebf 100644 --- a/codegen/crm/objects/notes/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/notes/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..d8a3fe5d0 --- /dev/null +++ b/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Notes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..5a8990fee --- /dev/null +++ b/codegen/crm/objects/notes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Notes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/notes/models/ObjectSerializer.ts b/codegen/crm/objects/notes/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/notes/models/ObjectSerializer.ts +++ b/codegen/crm/objects/notes/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/notes/models/PublicMergeInput.ts b/codegen/crm/objects/notes/models/PublicMergeInput.ts deleted file mode 100644 index 5faba2c9d..000000000 --- a/codegen/crm/objects/notes/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Notes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/notes/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/notes/models/PublicObjectSearchRequest.ts index aab01d1c3..f4ecdc1f3 100644 --- a/codegen/crm/objects/notes/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/notes/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/notes/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/notes/models/SimplePublicObjectBatchInput.ts index c7b361aa2..0dec902a9 100644 --- a/codegen/crm/objects/notes/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/notes/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/notes/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/notes/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..22d09bccc --- /dev/null +++ b/codegen/crm/objects/notes/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Notes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/notes/models/SimplePublicObjectInput.ts b/codegen/crm/objects/notes/models/SimplePublicObjectInput.ts index 97a43346c..eb90a0d6c 100644 --- a/codegen/crm/objects/notes/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/notes/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/notes/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/notes/models/SimplePublicObjectInputForCreate.ts index 9391a13a7..281a71abe 100644 --- a/codegen/crm/objects/notes/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/notes/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/notes/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/notes/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..69750e89a --- /dev/null +++ b/codegen/crm/objects/notes/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Notes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/notes/models/all.ts b/codegen/crm/objects/notes/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/notes/models/all.ts +++ b/codegen/crm/objects/notes/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/notes/types/ObjectParamAPI.ts b/codegen/crm/objects/notes/types/ObjectParamAPI.ts index 33f32d2b0..d291c88c3 100644 --- a/codegen/crm/objects/notes/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/notes/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two notes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two notes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/notes/types/ObservableAPI.ts b/codegen/crm/objects/notes/types/ObservableAPI.ts index 5078b831f..d8a5d7409 100644 --- a/codegen/crm/objects/notes/types/ObservableAPI.ts +++ b/codegen/crm/objects/notes/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two notes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two notes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/notes/types/PromiseAPI.ts b/codegen/crm/objects/notes/types/PromiseAPI.ts index a3e88322f..f9321ea9b 100644 --- a/codegen/crm/objects/notes/types/PromiseAPI.ts +++ b/codegen/crm/objects/notes/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of notes + * Update a batch of notes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two notes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two notes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of notes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } From c61010a3c418c17538e878c918bc18271bde5d5c Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 10:39:12 +0300 Subject: [PATCH 19/46] Update discoveries: CRM Meetings and Notes --- .../crm/objects/meetings/MeetingsDiscovery.ts | 6 ------ src/discovery/crm/objects/notes/NotesDiscovery.ts | 6 ------ test/spec/crm/objects/meetings/meetings.spec.ts | 12 +----------- test/spec/crm/objects/notes/notes.spec.ts | 6 +----- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/discovery/crm/objects/meetings/MeetingsDiscovery.ts b/src/discovery/crm/objects/meetings/MeetingsDiscovery.ts index c24b0ea30..6aaed8ac5 100644 --- a/src/discovery/crm/objects/meetings/MeetingsDiscovery.ts +++ b/src/discovery/crm/objects/meetings/MeetingsDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/meetings import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class MeetingsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class MeetingsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/notes/NotesDiscovery.ts b/src/discovery/crm/objects/notes/NotesDiscovery.ts index 95b71696f..37a4c89a2 100644 --- a/src/discovery/crm/objects/notes/NotesDiscovery.ts +++ b/src/discovery/crm/objects/notes/NotesDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/notes/co import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class NotesDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class NotesDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/test/spec/crm/objects/meetings/meetings.spec.ts b/test/spec/crm/objects/meetings/meetings.spec.ts index 7543f4b56..37381a127 100644 --- a/test/spec/crm/objects/meetings/meetings.spec.ts +++ b/test/spec/crm/objects/meetings/meetings.spec.ts @@ -1,10 +1,4 @@ -import { - BasicApi, - BatchApi, - GDPRApi, - PublicObjectApi, - SearchApi, -} from '../../../../../codegen/crm/objects/meetings/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/meetings/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -14,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/notes/notes.spec.ts b/test/spec/crm/objects/notes/notes.spec.ts index 4978e17fc..f518432f5 100644 --- a/test/spec/crm/objects/notes/notes.spec.ts +++ b/test/spec/crm/objects/notes/notes.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../../codegen/crm/objects/notes/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/notes/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From 19f395d362f754f088e38b35dda25e364a829a0b Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 10:57:08 +0300 Subject: [PATCH 20/46] Codegen: CRM Postal mail, Tasks and Taxes --- .../crm/objects/postal_mail/apis/BatchApi.ts | 96 +++++++++++++++- .../crm/objects/postal_mail/apis/GDPRApi.ts | 102 ----------------- .../postal_mail/apis/PublicObjectApi.ts | 106 ------------------ codegen/crm/objects/postal_mail/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../postal_mail/models/ObjectSerializer.ts | 23 +++- .../postal_mail/models/PublicMergeInput.ts | 41 ------- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/postal_mail/models/all.ts | 7 +- .../postal_mail/types/ObjectParamAPI.ts | 92 ++++----------- .../postal_mail/types/ObservableAPI.ts | 98 +++------------- .../objects/postal_mail/types/PromiseAPI.ts | 85 +++----------- codegen/crm/objects/tasks/apis/BatchApi.ts | 96 +++++++++++++++- codegen/crm/objects/tasks/apis/GDPRApi.ts | 102 ----------------- .../crm/objects/tasks/apis/PublicObjectApi.ts | 106 ------------------ codegen/crm/objects/tasks/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../objects/tasks/models/ObjectSerializer.ts | 23 +++- .../objects/tasks/models/PublicMergeInput.ts | 41 ------- .../tasks/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../tasks/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../tasks/models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/tasks/models/all.ts | 7 +- .../crm/objects/tasks/types/ObjectParamAPI.ts | 92 ++++----------- .../crm/objects/tasks/types/ObservableAPI.ts | 98 +++------------- codegen/crm/objects/tasks/types/PromiseAPI.ts | 85 +++----------- codegen/crm/objects/taxes/apis/BatchApi.ts | 96 +++++++++++++++- codegen/crm/objects/taxes/apis/GDPRApi.ts | 102 ----------------- .../crm/objects/taxes/apis/PublicObjectApi.ts | 106 ------------------ codegen/crm/objects/taxes/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../objects/taxes/models/ObjectSerializer.ts | 23 +++- .../objects/taxes/models/PublicMergeInput.ts | 41 ------- .../taxes/models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 +++ .../SimplePublicObjectBatchInputUpsert.ts | 58 ++++++++++ .../taxes/models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 7 ++ .../taxes/models/SimplePublicUpsertObject.ts | 84 ++++++++++++++ codegen/crm/objects/taxes/models/all.ts | 7 +- .../crm/objects/taxes/types/ObjectParamAPI.ts | 92 ++++----------- .../crm/objects/taxes/types/ObservableAPI.ts | 98 +++------------- codegen/crm/objects/taxes/types/PromiseAPI.ts | 85 +++----------- 60 files changed, 1578 insertions(+), 1497 deletions(-) delete mode 100644 codegen/crm/objects/postal_mail/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/postal_mail/apis/PublicObjectApi.ts rename codegen/crm/objects/postal_mail/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/postal_mail/models/PublicMergeInput.ts create mode 100644 codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/objects/postal_mail/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/tasks/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/tasks/apis/PublicObjectApi.ts rename codegen/crm/objects/tasks/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/tasks/models/PublicMergeInput.ts create mode 100644 codegen/crm/objects/tasks/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/objects/tasks/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/objects/taxes/apis/GDPRApi.ts delete mode 100644 codegen/crm/objects/taxes/apis/PublicObjectApi.ts rename codegen/crm/objects/taxes/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/objects/taxes/models/PublicMergeInput.ts create mode 100644 codegen/crm/objects/taxes/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/objects/taxes/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/objects/postal_mail/apis/BatchApi.ts b/codegen/crm/objects/postal_mail/apis/BatchApi.ts index bc90016c3..fd8fb7b0e 100644 --- a/codegen/crm/objects/postal_mail/apis/BatchApi.ts +++ b/codegen/crm/objects/postal_mail/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/postal_mail/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/postal_mail/apis/GDPRApi.ts b/codegen/crm/objects/postal_mail/apis/GDPRApi.ts deleted file mode 100644 index 9f0eba45e..000000000 --- a/codegen/crm/objects/postal_mail/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/postal_mail/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/postal_mail/apis/PublicObjectApi.ts b/codegen/crm/objects/postal_mail/apis/PublicObjectApi.ts deleted file mode 100644 index fa09dc0c5..000000000 --- a/codegen/crm/objects/postal_mail/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two postal mail with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/postal_mail/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/postal_mail/index.ts b/codegen/crm/objects/postal_mail/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/postal_mail/index.ts +++ b/codegen/crm/objects/postal_mail/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/postal_mail/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/postal_mail/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/objects/postal_mail/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/postal_mail/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 7c35d8b28..24125ddb7 100644 --- a/codegen/crm/objects/postal_mail/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/postal_mail/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/postal_mail/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/postal_mail/models/BatchReadInputSimplePublicObjectId.ts index 1a82e2d19..e25dc8ec4 100644 --- a/codegen/crm/objects/postal_mail/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/postal_mail/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..831b5e819 --- /dev/null +++ b/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Postal Mail + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..546355099 --- /dev/null +++ b/codegen/crm/objects/postal_mail/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Postal Mail + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/postal_mail/models/ObjectSerializer.ts b/codegen/crm/objects/postal_mail/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/postal_mail/models/ObjectSerializer.ts +++ b/codegen/crm/objects/postal_mail/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/postal_mail/models/PublicMergeInput.ts b/codegen/crm/objects/postal_mail/models/PublicMergeInput.ts deleted file mode 100644 index 7763c8d15..000000000 --- a/codegen/crm/objects/postal_mail/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Postal Mail - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/postal_mail/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/postal_mail/models/PublicObjectSearchRequest.ts index c1e5ebff9..da770af2b 100644 --- a/codegen/crm/objects/postal_mail/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/postal_mail/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInput.ts index 47a5c0dbb..4ba408e3c 100644 --- a/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..51d0837ac --- /dev/null +++ b/codegen/crm/objects/postal_mail/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Postal Mail + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/postal_mail/models/SimplePublicObjectInput.ts b/codegen/crm/objects/postal_mail/models/SimplePublicObjectInput.ts index 32c2cf2e1..f4cb085c2 100644 --- a/codegen/crm/objects/postal_mail/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/postal_mail/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/postal_mail/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/postal_mail/models/SimplePublicObjectInputForCreate.ts index 0fbbeca9d..12e7ee9ab 100644 --- a/codegen/crm/objects/postal_mail/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/postal_mail/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/postal_mail/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/postal_mail/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..26768919a --- /dev/null +++ b/codegen/crm/objects/postal_mail/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Postal Mail + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/postal_mail/models/all.ts b/codegen/crm/objects/postal_mail/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/postal_mail/models/all.ts +++ b/codegen/crm/objects/postal_mail/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/postal_mail/types/ObjectParamAPI.ts b/codegen/crm/objects/postal_mail/types/ObjectParamAPI.ts index 6a2812534..67627a567 100644 --- a/codegen/crm/objects/postal_mail/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/postal_mail/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two postal mail with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two postal mail with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/postal_mail/types/ObservableAPI.ts b/codegen/crm/objects/postal_mail/types/ObservableAPI.ts index 1f547df17..2148a9295 100644 --- a/codegen/crm/objects/postal_mail/types/ObservableAPI.ts +++ b/codegen/crm/objects/postal_mail/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two postal mail with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two postal mail with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/postal_mail/types/PromiseAPI.ts b/codegen/crm/objects/postal_mail/types/PromiseAPI.ts index 5fbd7c8e8..61bea6246 100644 --- a/codegen/crm/objects/postal_mail/types/PromiseAPI.ts +++ b/codegen/crm/objects/postal_mail/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of postal mail + * Update a batch of postal mail by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two postal mail with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two postal mail with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of postal mail by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/tasks/apis/BatchApi.ts b/codegen/crm/objects/tasks/apis/BatchApi.ts index 74c8df7df..8963f967c 100644 --- a/codegen/crm/objects/tasks/apis/BatchApi.ts +++ b/codegen/crm/objects/tasks/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/tasks/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/tasks/apis/GDPRApi.ts b/codegen/crm/objects/tasks/apis/GDPRApi.ts deleted file mode 100644 index bae653430..000000000 --- a/codegen/crm/objects/tasks/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/tasks/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/tasks/apis/PublicObjectApi.ts b/codegen/crm/objects/tasks/apis/PublicObjectApi.ts deleted file mode 100644 index fd86d3617..000000000 --- a/codegen/crm/objects/tasks/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two tasks with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/tasks/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/tasks/index.ts b/codegen/crm/objects/tasks/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/tasks/index.ts +++ b/codegen/crm/objects/tasks/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/tasks/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/tasks/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/objects/tasks/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/tasks/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 4d7c611c3..f14ddf22f 100644 --- a/codegen/crm/objects/tasks/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/tasks/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/tasks/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/tasks/models/BatchReadInputSimplePublicObjectId.ts index 3e659ea77..433aba0da 100644 --- a/codegen/crm/objects/tasks/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/tasks/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..595838b3d --- /dev/null +++ b/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Tasks + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..3ebf37c89 --- /dev/null +++ b/codegen/crm/objects/tasks/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Tasks + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/tasks/models/ObjectSerializer.ts b/codegen/crm/objects/tasks/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/tasks/models/ObjectSerializer.ts +++ b/codegen/crm/objects/tasks/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/tasks/models/PublicMergeInput.ts b/codegen/crm/objects/tasks/models/PublicMergeInput.ts deleted file mode 100644 index 944788158..000000000 --- a/codegen/crm/objects/tasks/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Tasks - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/tasks/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/tasks/models/PublicObjectSearchRequest.ts index f8ce5ef56..56b02f9fb 100644 --- a/codegen/crm/objects/tasks/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/tasks/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInput.ts index 663c95933..63edfcc44 100644 --- a/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..dcf569bff --- /dev/null +++ b/codegen/crm/objects/tasks/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Tasks + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/tasks/models/SimplePublicObjectInput.ts b/codegen/crm/objects/tasks/models/SimplePublicObjectInput.ts index 84ef8d51e..e765cad70 100644 --- a/codegen/crm/objects/tasks/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/tasks/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/tasks/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/tasks/models/SimplePublicObjectInputForCreate.ts index 92a0db2e8..5503b9588 100644 --- a/codegen/crm/objects/tasks/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/tasks/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/tasks/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/tasks/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..8d39d64fe --- /dev/null +++ b/codegen/crm/objects/tasks/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Tasks + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/tasks/models/all.ts b/codegen/crm/objects/tasks/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/tasks/models/all.ts +++ b/codegen/crm/objects/tasks/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/tasks/types/ObjectParamAPI.ts b/codegen/crm/objects/tasks/types/ObjectParamAPI.ts index 309d857ef..625f356cb 100644 --- a/codegen/crm/objects/tasks/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/tasks/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two tasks with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two tasks with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/tasks/types/ObservableAPI.ts b/codegen/crm/objects/tasks/types/ObservableAPI.ts index 2674bad56..685316a7b 100644 --- a/codegen/crm/objects/tasks/types/ObservableAPI.ts +++ b/codegen/crm/objects/tasks/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two tasks with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two tasks with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/tasks/types/PromiseAPI.ts b/codegen/crm/objects/tasks/types/PromiseAPI.ts index b2af40984..47173966f 100644 --- a/codegen/crm/objects/tasks/types/PromiseAPI.ts +++ b/codegen/crm/objects/tasks/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of tasks + * Update a batch of tasks by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two tasks with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two tasks with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of tasks by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/objects/taxes/apis/BatchApi.ts b/codegen/crm/objects/taxes/apis/BatchApi.ts index c3bb90751..628801945 100644 --- a/codegen/crm/objects/taxes/apis/BatchApi.ts +++ b/codegen/crm/objects/taxes/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/taxes/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/objects/taxes/apis/GDPRApi.ts b/codegen/crm/objects/taxes/apis/GDPRApi.ts deleted file mode 100644 index 902745a3d..000000000 --- a/codegen/crm/objects/taxes/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/taxes/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/taxes/apis/PublicObjectApi.ts b/codegen/crm/objects/taxes/apis/PublicObjectApi.ts deleted file mode 100644 index 7ce381d04..000000000 --- a/codegen/crm/objects/taxes/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two taxes with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/taxes/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/objects/taxes/index.ts b/codegen/crm/objects/taxes/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/objects/taxes/index.ts +++ b/codegen/crm/objects/taxes/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/objects/taxes/models/PublicGdprDeleteInput.ts b/codegen/crm/objects/taxes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/objects/taxes/models/PublicGdprDeleteInput.ts rename to codegen/crm/objects/taxes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 28e1a3658..a10d2966f 100644 --- a/codegen/crm/objects/taxes/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/objects/taxes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/objects/taxes/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/objects/taxes/models/BatchReadInputSimplePublicObjectId.ts index 3511b1a3f..bf5264ea4 100644 --- a/codegen/crm/objects/taxes/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/objects/taxes/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..1988db318 --- /dev/null +++ b/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Taxes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..4a23d237f --- /dev/null +++ b/codegen/crm/objects/taxes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Taxes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/objects/taxes/models/ObjectSerializer.ts b/codegen/crm/objects/taxes/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/objects/taxes/models/ObjectSerializer.ts +++ b/codegen/crm/objects/taxes/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/objects/taxes/models/PublicMergeInput.ts b/codegen/crm/objects/taxes/models/PublicMergeInput.ts deleted file mode 100644 index a1cda7e21..000000000 --- a/codegen/crm/objects/taxes/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Taxes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/objects/taxes/models/PublicObjectSearchRequest.ts b/codegen/crm/objects/taxes/models/PublicObjectSearchRequest.ts index 7b73d3fae..0b1cbf781 100644 --- a/codegen/crm/objects/taxes/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/objects/taxes/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInput.ts b/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInput.ts index 87a7b404c..3dbf743b4 100644 --- a/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..597b8bf50 --- /dev/null +++ b/codegen/crm/objects/taxes/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Taxes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/taxes/models/SimplePublicObjectInput.ts b/codegen/crm/objects/taxes/models/SimplePublicObjectInput.ts index 51c3c1339..c7e228c86 100644 --- a/codegen/crm/objects/taxes/models/SimplePublicObjectInput.ts +++ b/codegen/crm/objects/taxes/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/taxes/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/objects/taxes/models/SimplePublicObjectInputForCreate.ts index 40eef4ddd..c0cf584dc 100644 --- a/codegen/crm/objects/taxes/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/objects/taxes/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/objects/taxes/models/SimplePublicUpsertObject.ts b/codegen/crm/objects/taxes/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..53cc7351f --- /dev/null +++ b/codegen/crm/objects/taxes/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Taxes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/objects/taxes/models/all.ts b/codegen/crm/objects/taxes/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/objects/taxes/models/all.ts +++ b/codegen/crm/objects/taxes/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/objects/taxes/types/ObjectParamAPI.ts b/codegen/crm/objects/taxes/types/ObjectParamAPI.ts index a3e810197..c74085597 100644 --- a/codegen/crm/objects/taxes/types/ObjectParamAPI.ts +++ b/codegen/crm/objects/taxes/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two taxes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two taxes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/objects/taxes/types/ObservableAPI.ts b/codegen/crm/objects/taxes/types/ObservableAPI.ts index 6e8618878..8fb4011b7 100644 --- a/codegen/crm/objects/taxes/types/ObservableAPI.ts +++ b/codegen/crm/objects/taxes/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two taxes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two taxes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/objects/taxes/types/PromiseAPI.ts b/codegen/crm/objects/taxes/types/PromiseAPI.ts index b7fa517f2..f48a673d2 100644 --- a/codegen/crm/objects/taxes/types/PromiseAPI.ts +++ b/codegen/crm/objects/taxes/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of taxes + * Update a batch of taxes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two taxes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two taxes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of taxes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } From df7a0469bcaa584e51ce3f296de4bb038648860d Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 11:02:25 +0300 Subject: [PATCH 21/46] Update discoveries: CRM Postal mail, Tasks and Taxes --- .../crm/objects/postal_mail/PostalMailDiscovery.ts | 6 ------ src/discovery/crm/objects/tasks/TasksDiscovery.ts | 6 ------ src/discovery/crm/objects/taxes/TaxesDiscovery.ts | 6 ------ .../spec/crm/objects/postal_mail/postal_mail.spec.ts | 12 +----------- test/spec/crm/objects/tasks/tasks.spec.ts | 6 +----- test/spec/crm/objects/taxes/taxes.spec.ts | 6 +----- 6 files changed, 3 insertions(+), 39 deletions(-) diff --git a/src/discovery/crm/objects/postal_mail/PostalMailDiscovery.ts b/src/discovery/crm/objects/postal_mail/PostalMailDiscovery.ts index b68da6849..e35db0118 100644 --- a/src/discovery/crm/objects/postal_mail/PostalMailDiscovery.ts +++ b/src/discovery/crm/objects/postal_mail/PostalMailDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/postal_m import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class PostalMailDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class PostalMailDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/tasks/TasksDiscovery.ts b/src/discovery/crm/objects/tasks/TasksDiscovery.ts index a9fc2e2f4..31d46d130 100644 --- a/src/discovery/crm/objects/tasks/TasksDiscovery.ts +++ b/src/discovery/crm/objects/tasks/TasksDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/tasks/co import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class TasksDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class TasksDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/src/discovery/crm/objects/taxes/TaxesDiscovery.ts b/src/discovery/crm/objects/taxes/TaxesDiscovery.ts index bd2703de6..df350bc8b 100644 --- a/src/discovery/crm/objects/taxes/TaxesDiscovery.ts +++ b/src/discovery/crm/objects/taxes/TaxesDiscovery.ts @@ -2,8 +2,6 @@ import { createConfiguration } from '../../../../../codegen/crm/objects/taxes/co import { BasicApi, BatchApi, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -17,8 +15,6 @@ import ApiDecoratorService from '../../../../services/ApiDecoratorService' export default class TaxesDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -34,8 +30,6 @@ export default class TaxesDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } } diff --git a/test/spec/crm/objects/postal_mail/postal_mail.spec.ts b/test/spec/crm/objects/postal_mail/postal_mail.spec.ts index 65703a328..79279fd52 100644 --- a/test/spec/crm/objects/postal_mail/postal_mail.spec.ts +++ b/test/spec/crm/objects/postal_mail/postal_mail.spec.ts @@ -1,10 +1,4 @@ -import { - BasicApi, - BatchApi, - GDPRApi, - PublicObjectApi, - SearchApi, -} from '../../../../../codegen/crm/objects/postal_mail/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/postal_mail/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -14,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/tasks/tasks.spec.ts b/test/spec/crm/objects/tasks/tasks.spec.ts index 4720e7e8d..89d14d4a4 100644 --- a/test/spec/crm/objects/tasks/tasks.spec.ts +++ b/test/spec/crm/objects/tasks/tasks.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../../codegen/crm/objects/tasks/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/tasks/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) diff --git a/test/spec/crm/objects/taxes/taxes.spec.ts b/test/spec/crm/objects/taxes/taxes.spec.ts index 7073cdd40..7988fe644 100644 --- a/test/spec/crm/objects/taxes/taxes.spec.ts +++ b/test/spec/crm/objects/taxes/taxes.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../../codegen/crm/objects/taxes/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../../codegen/crm/objects/taxes/index' import { Client } from '../../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From 0b9358c0538ac3e6fcda0fb85f205fca045745db Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 12:25:32 +0300 Subject: [PATCH 22/46] Codegen: Crm Products --- codegen/crm/products/apis/BasicApi.ts | 6 +- codegen/crm/products/apis/BatchApi.ts | 96 ++++++++++++++- codegen/crm/products/apis/GDPRApi.ts | 102 ---------------- codegen/crm/products/apis/PublicObjectApi.ts | 106 ----------------- codegen/crm/products/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 ++-- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 +++++++++++++++ .../crm/products/models/ObjectSerializer.ts | 23 +++- .../crm/products/models/PublicMergeInput.ts | 41 ------- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 15 ++- .../SimplePublicObjectBatchInputUpsert.ts | 58 +++++++++ .../models/SimplePublicObjectInput.ts | 7 ++ .../SimplePublicObjectInputForCreate.ts | 10 +- .../models/SimplePublicUpsertObject.ts | 84 +++++++++++++ codegen/crm/products/models/all.ts | 7 +- codegen/crm/products/types/ObjectParamAPI.ts | 100 +++++----------- codegen/crm/products/types/ObservableAPI.ts | 110 ++++-------------- codegen/crm/products/types/PromiseAPI.ts | 97 ++++----------- 21 files changed, 546 insertions(+), 522 deletions(-) delete mode 100644 codegen/crm/products/apis/GDPRApi.ts delete mode 100644 codegen/crm/products/apis/PublicObjectApi.ts rename codegen/crm/products/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/products/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/products/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/products/models/PublicMergeInput.ts create mode 100644 codegen/crm/products/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/products/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/products/apis/BasicApi.ts b/codegen/crm/products/apis/BasicApi.ts index cd948b062..753b37982 100644 --- a/codegen/crm/products/apis/BasicApi.ts +++ b/codegen/crm/products/apis/BasicApi.ts @@ -113,7 +113,7 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public async getById(productId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -251,11 +251,11 @@ export class BasicApiRequestFactory extends BaseAPIRequestFactory { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param productId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object. */ public async update(productId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/crm/products/apis/BatchApi.ts b/codegen/crm/products/apis/BatchApi.ts index 48d0ca81f..80df002e9 100644 --- a/codegen/crm/products/apis/BatchApi.ts +++ b/codegen/crm/products/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/products/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/products/apis/GDPRApi.ts b/codegen/crm/products/apis/GDPRApi.ts deleted file mode 100644 index 80e6de515..000000000 --- a/codegen/crm/products/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/products/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/products/apis/PublicObjectApi.ts b/codegen/crm/products/apis/PublicObjectApi.ts deleted file mode 100644 index 109c8b7c9..000000000 --- a/codegen/crm/products/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two products with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/products/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/products/index.ts b/codegen/crm/products/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/products/index.ts +++ b/codegen/crm/products/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/products/models/PublicGdprDeleteInput.ts b/codegen/crm/products/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/products/models/PublicGdprDeleteInput.ts rename to codegen/crm/products/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index 4b99c98fa..36982ec19 100644 --- a/codegen/crm/products/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/products/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/products/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/products/models/BatchReadInputSimplePublicObjectId.ts index bd8530d3f..bd01bd4d6 100644 --- a/codegen/crm/products/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/products/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object. + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/products/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/products/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..b75357398 --- /dev/null +++ b/codegen/crm/products/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Products + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/products/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/products/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..016a153e1 --- /dev/null +++ b/codegen/crm/products/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Products + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/products/models/ObjectSerializer.ts b/codegen/crm/products/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/products/models/ObjectSerializer.ts +++ b/codegen/crm/products/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/products/models/PublicMergeInput.ts b/codegen/crm/products/models/PublicMergeInput.ts deleted file mode 100644 index 46e460def..000000000 --- a/codegen/crm/products/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Products - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/products/models/PublicObjectSearchRequest.ts b/codegen/crm/products/models/PublicObjectSearchRequest.ts index 5a0df1855..39e925a6a 100644 --- a/codegen/crm/products/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/products/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/products/models/SimplePublicObjectBatchInput.ts b/codegen/crm/products/models/SimplePublicObjectBatchInput.ts index 91dfd2857..08d67acfe 100644 --- a/codegen/crm/products/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/products/models/SimplePublicObjectBatchInput.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/products/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/products/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..6794fb835 --- /dev/null +++ b/codegen/crm/products/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Products + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/products/models/SimplePublicObjectInput.ts b/codegen/crm/products/models/SimplePublicObjectInput.ts index 00d9160d3..c9927bb54 100644 --- a/codegen/crm/products/models/SimplePublicObjectInput.ts +++ b/codegen/crm/products/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/products/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/products/models/SimplePublicObjectInputForCreate.ts index 967ecf304..275bae320 100644 --- a/codegen/crm/products/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/products/models/SimplePublicObjectInputForCreate.ts @@ -14,9 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations'?: Array; - /** - * - */ + 'objectWriteTraceId'?: string; 'properties'?: { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -28,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/products/models/SimplePublicUpsertObject.ts b/codegen/crm/products/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..83e199122 --- /dev/null +++ b/codegen/crm/products/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Products + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/products/models/all.ts b/codegen/crm/products/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/products/models/all.ts +++ b/codegen/crm/products/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/products/types/ObjectParamAPI.ts b/codegen/crm/products/types/ObjectParamAPI.ts index a8870b19f..8912e50bf 100644 --- a/codegen/crm/products/types/ObjectParamAPI.ts +++ b/codegen/crm/products/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -70,7 +71,7 @@ export interface BasicApiGetByIdRequest { */ archived?: boolean /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object * @type string * @memberof BasicApigetById */ @@ -130,7 +131,7 @@ export interface BasicApiUpdateRequest { */ simplePublicObjectInput: SimplePublicObjectInput /** - * The name of a property whose values are unique for this object type + * The name of a property whose values are unique for this object. * @type string * @memberof BasicApiupdate */ @@ -217,7 +218,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -226,7 +227,7 @@ export class ObjectBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param param the request object */ @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two products with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two products with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/products/types/ObservableAPI.ts b/codegen/crm/products/types/ObservableAPI.ts index 21af06980..3561abb55 100644 --- a/codegen/crm/products/types/ObservableAPI.ts +++ b/codegen/crm/products/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -108,7 +109,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(productId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.getById(productId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -137,7 +138,7 @@ export class ObservableBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(productId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Observable { return this.getByIdWithHttpInfo(productId, properties, propertiesWithHistory, associations, archived, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -187,11 +188,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param productId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object. */ public updateWithHttpInfo(productId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable> { const requestContextPromise = this.requestFactory.update(productId, simplePublicObjectInput, idProperty, _options); @@ -213,11 +214,11 @@ export class ObservableBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param productId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object. */ public update(productId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Observable { return this.updateWithHttpInfo(productId, simplePublicObjectInput, idProperty, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two products with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two products with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/products/types/PromiseAPI.ts b/codegen/crm/products/types/PromiseAPI.ts index 011f80a98..d21940573 100644 --- a/codegen/crm/products/types/PromiseAPI.ts +++ b/codegen/crm/products/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -78,7 +79,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getByIdWithHttpInfo(productId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.getByIdWithHttpInfo(productId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -93,7 +94,7 @@ export class PromiseBasicApi { * @param propertiesWithHistory A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. * @param associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. * @param archived Whether to return only results that have been archived. - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object */ public getById(productId: string, properties?: Array, propertiesWithHistory?: Array, associations?: Array, archived?: boolean, idProperty?: string, _options?: Configuration): Promise { const result = this.api.getById(productId, properties, propertiesWithHistory, associations, archived, idProperty, _options); @@ -131,11 +132,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param productId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object. */ public updateWithHttpInfo(productId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise> { const result = this.api.updateWithHttpInfo(productId, simplePublicObjectInput, idProperty, _options); @@ -143,11 +144,11 @@ export class PromiseBasicApi { } /** - * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string. + * Perform a partial update of an Object identified by `{productId}`. `{productId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string. * Update * @param productId * @param simplePublicObjectInput - * @param idProperty The name of a property whose values are unique for this object type + * @param idProperty The name of a property whose values are unique for this object. */ public update(productId: string, simplePublicObjectInput: SimplePublicObjectInput, idProperty?: string, _options?: Configuration): Promise { const result = this.api.update(productId, simplePublicObjectInput, idProperty, _options); @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of products + * Update a batch of products by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two products with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two products with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of products by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } From abac4169a57a4e050d5d40a89495bed93059820f Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 12:29:47 +0300 Subject: [PATCH 23/46] Update CRM Products discoveries --- src/discovery/crm/products/ProductsDiscovery.ts | 6 ------ test/spec/crm/products/products.spec.ts | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/discovery/crm/products/ProductsDiscovery.ts b/src/discovery/crm/products/ProductsDiscovery.ts index b10a8be0d..fac403248 100644 --- a/src/discovery/crm/products/ProductsDiscovery.ts +++ b/src/discovery/crm/products/ProductsDiscovery.ts @@ -3,8 +3,6 @@ import { BatchApi, Configuration, createConfiguration, - GDPRApi, - PublicObjectApi, RequestContext, ResponseContext, SearchApi, @@ -20,8 +18,6 @@ import { getAll } from '../../../services/getAll' export default class ProductsDiscovery { public basicApi: BasicApi public batchApi: BatchApi - public gdprApi: GDPRApi - public publicObjectApi: PublicObjectApi public searchApi: SearchApi constructor(config: IConfiguration) { @@ -37,8 +33,6 @@ export default class ProductsDiscovery { this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) - this.gdprApi = ApiDecoratorService.getInstance().apply(new GDPRApi(configuration)) - this.publicObjectApi = ApiDecoratorService.getInstance().apply(new PublicObjectApi(configuration)) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) } diff --git a/test/spec/crm/products/products.spec.ts b/test/spec/crm/products/products.spec.ts index a358b54e2..344db9f23 100644 --- a/test/spec/crm/products/products.spec.ts +++ b/test/spec/crm/products/products.spec.ts @@ -1,4 +1,4 @@ -import { BasicApi, BatchApi, GDPRApi, PublicObjectApi, SearchApi } from '../../../../codegen/crm/products/index' +import { BasicApi, BatchApi, SearchApi } from '../../../../codegen/crm/products/index' import { Client } from '../../../../index' describe('api client', () => { @@ -8,10 +8,6 @@ describe('api client', () => { expect(BasicApi.name).toBe(client.basicApi.constructor.name) expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(BatchApi.name).toBe(client.batchApi.constructor.name) - expect(client.hasOwnProperty('gdprApi')).toBeTruthy() - expect(GDPRApi.name).toBe(client.gdprApi.constructor.name) - expect(client.hasOwnProperty('publicObjectApi')).toBeTruthy() - expect(PublicObjectApi.name).toBe(client.publicObjectApi.constructor.name) expect(client.hasOwnProperty('searchApi')).toBeTruthy() expect(SearchApi.name).toBe(client.searchApi.constructor.name) }) From 1b6498ee48436ccddb4ee1a5887df32c63bfe51a Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 11 Sep 2024 12:54:22 +0300 Subject: [PATCH 24/46] Codegen: CRM Quotes, Schemas and Tickets --- codegen/crm/quotes/apis/BatchApi.ts | 96 +++++++- codegen/crm/quotes/apis/GDPRApi.ts | 102 --------- codegen/crm/quotes/apis/PublicObjectApi.ts | 106 --------- codegen/crm/quotes/index.ts | 2 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 +- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++ codegen/crm/quotes/models/ObjectSerializer.ts | 23 +- codegen/crm/quotes/models/PublicMergeInput.ts | 41 ---- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 ++ .../SimplePublicObjectBatchInputUpsert.ts | 58 +++++ .../quotes/models/SimplePublicObjectInput.ts | 7 + .../SimplePublicObjectInputForCreate.ts | 7 + .../quotes/models/SimplePublicUpsertObject.ts | 84 +++++++ codegen/crm/quotes/models/all.ts | 7 +- codegen/crm/quotes/types/ObjectParamAPI.ts | 92 ++------ codegen/crm/quotes/types/ObservableAPI.ts | 98 ++------ codegen/crm/quotes/types/PromiseAPI.ts | 85 ++----- codegen/crm/schemas/apis/CoreApi.ts | 14 +- .../schemas/apis/PublicObjectSchemasApi.ts | 89 -------- codegen/crm/schemas/index.ts | 2 +- .../schemas/models/AssociationDefinition.ts | 2 +- .../models/AssociationDefinitionEgg.ts | 2 +- codegen/crm/schemas/models/ObjectSchema.ts | 14 ++ .../crm/schemas/models/ObjectSerializer.ts | 3 +- .../models/ObjectTypeDefinitionPatch.ts | 7 + codegen/crm/schemas/models/Property.ts | 211 ++++++++++-------- codegen/crm/schemas/types/ObjectParamAPI.ts | 35 --- codegen/crm/schemas/types/ObservableAPI.ts | 47 ---- codegen/crm/schemas/types/PromiseAPI.ts | 35 --- codegen/crm/tickets/apis/BasicApi.ts | 6 +- codegen/crm/tickets/apis/BatchApi.ts | 96 +++++++- codegen/crm/tickets/apis/GDPRApi.ts | 102 --------- .../apis/{PublicObjectApi.ts => MergeApi.ts} | 6 +- codegen/crm/tickets/index.ts | 2 +- codegen/crm/tickets/models/AssociationSpec.ts | 4 +- ...nputSimplePublicObjectBatchInputUpsert.ts} | 20 +- .../BatchReadInputSimplePublicObjectId.ts | 3 + .../BatchResponseSimplePublicUpsertObject.ts | 78 +++++++ ...ponseSimplePublicUpsertObjectWithErrors.ts | 93 ++++++++ .../crm/tickets/models/ObjectSerializer.ts | 20 +- .../models/PublicAssociationsForObject.ts | 4 +- codegen/crm/tickets/models/PublicObjectId.ts | 2 +- .../models/PublicObjectSearchRequest.ts | 10 +- .../models/SimplePublicObjectBatchInput.ts | 13 ++ .../SimplePublicObjectBatchInputUpsert.ts | 58 +++++ .../tickets/models/SimplePublicObjectInput.ts | 7 + .../SimplePublicObjectInputForCreate.ts | 9 +- .../models/SimplePublicUpsertObject.ts | 84 +++++++ codegen/crm/tickets/models/all.ts | 6 +- codegen/crm/tickets/types/ObjectParamAPI.ts | 82 +++---- codegen/crm/tickets/types/ObservableAPI.ts | 76 +++---- codegen/crm/tickets/types/PromiseAPI.ts | 73 +++--- 55 files changed, 1254 insertions(+), 1086 deletions(-) delete mode 100644 codegen/crm/quotes/apis/GDPRApi.ts delete mode 100644 codegen/crm/quotes/apis/PublicObjectApi.ts rename codegen/crm/quotes/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts delete mode 100644 codegen/crm/quotes/models/PublicMergeInput.ts create mode 100644 codegen/crm/quotes/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/quotes/models/SimplePublicUpsertObject.ts delete mode 100644 codegen/crm/schemas/apis/PublicObjectSchemasApi.ts delete mode 100644 codegen/crm/tickets/apis/GDPRApi.ts rename codegen/crm/tickets/apis/{PublicObjectApi.ts => MergeApi.ts} (95%) rename codegen/crm/tickets/models/{PublicGdprDeleteInput.ts => BatchInputSimplePublicObjectBatchInputUpsert.ts} (60%) create mode 100644 codegen/crm/tickets/models/BatchResponseSimplePublicUpsertObject.ts create mode 100644 codegen/crm/tickets/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts create mode 100644 codegen/crm/tickets/models/SimplePublicObjectBatchInputUpsert.ts create mode 100644 codegen/crm/tickets/models/SimplePublicUpsertObject.ts diff --git a/codegen/crm/quotes/apis/BatchApi.ts b/codegen/crm/quotes/apis/BatchApi.ts index c14186890..cde2e4db1 100644 --- a/codegen/crm/quotes/apis/BatchApi.ts +++ b/codegen/crm/quotes/apis/BatchApi.ts @@ -9,11 +9,14 @@ import {SecurityAuthentication} from '../auth/auth'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; /** * no description @@ -169,7 +172,7 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public async update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -215,6 +218,54 @@ export class BatchApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert + */ + public async upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputSimplePublicObjectBatchInputUpsert' is not null or undefined + if (batchInputSimplePublicObjectBatchInputUpsert === null || batchInputSimplePublicObjectBatchInputUpsert === undefined) { + throw new RequiredError("BatchApi", "upsert", "batchInputSimplePublicObjectBatchInputUpsert"); + } + + + // Path Params + const localVarPath = '/crm/v3/objects/quotes/batch/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectBatchInputUpsert", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class BatchApiResponseProcessor { @@ -380,4 +431,47 @@ export class BatchApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to upsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("207", response.httpStatusCode)) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject", "" + ) as BatchResponseSimplePublicUpsertObjectWithErrors | BatchResponseSimplePublicUpsertObject; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/codegen/crm/quotes/apis/GDPRApi.ts b/codegen/crm/quotes/apis/GDPRApi.ts deleted file mode 100644 index ac7752674..000000000 --- a/codegen/crm/quotes/apis/GDPRApi.ts +++ /dev/null @@ -1,102 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; - -/** - * no description - */ -export class GDPRApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public async purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicGdprDeleteInput' is not null or undefined - if (publicGdprDeleteInput === null || publicGdprDeleteInput === undefined) { - throw new RequiredError("GDPRApi", "purge", "publicGdprDeleteInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/quotes/gdpr-delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicGdprDeleteInput, "PublicGdprDeleteInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class GDPRApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/quotes/apis/PublicObjectApi.ts b/codegen/crm/quotes/apis/PublicObjectApi.ts deleted file mode 100644 index 764a6380e..000000000 --- a/codegen/crm/quotes/apis/PublicObjectApi.ts +++ /dev/null @@ -1,106 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - -import { PublicMergeInput } from '../models/PublicMergeInput'; -import { SimplePublicObject } from '../models/SimplePublicObject'; - -/** - * no description - */ -export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory { - - /** - * Merge two quotes with same type - * @param publicMergeInput - */ - public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'publicMergeInput' is not null or undefined - if (publicMergeInput === null || publicMergeInput === undefined) { - throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput"); - } - - - // Path Params - const localVarPath = '/crm/v3/objects/quotes/merge'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(publicMergeInput, "PublicMergeInput", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to merge - * @throws ApiException if the response code was not in [200, 299] - */ - public async mergeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SimplePublicObject = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SimplePublicObject", "" - ) as SimplePublicObject; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/quotes/index.ts b/codegen/crm/quotes/index.ts index 57d6524bf..d11c86cbc 100644 --- a/codegen/crm/quotes/index.ts +++ b/codegen/crm/quotes/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; +export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI'; diff --git a/codegen/crm/quotes/models/PublicGdprDeleteInput.ts b/codegen/crm/quotes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts similarity index 60% rename from codegen/crm/quotes/models/PublicGdprDeleteInput.ts rename to codegen/crm/quotes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts index aaa40f612..79b2232a9 100644 --- a/codegen/crm/quotes/models/PublicGdprDeleteInput.ts +++ b/codegen/crm/quotes/models/BatchInputSimplePublicObjectBatchInputUpsert.ts @@ -10,29 +10,23 @@ * Do not edit the class manually. */ +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; -export class PublicGdprDeleteInput { - 'idProperty'?: string; - 'objectId': string; +export class BatchInputSimplePublicObjectBatchInputUpsert { + 'inputs': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "idProperty", - "baseName": "idProperty", - "type": "string", - "format": "" - }, - { - "name": "objectId", - "baseName": "objectId", - "type": "string", + "name": "inputs", + "baseName": "inputs", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return PublicGdprDeleteInput.attributeTypeMap; + return BatchInputSimplePublicObjectBatchInputUpsert.attributeTypeMap; } public constructor() { diff --git a/codegen/crm/quotes/models/BatchReadInputSimplePublicObjectId.ts b/codegen/crm/quotes/models/BatchReadInputSimplePublicObjectId.ts index 478a74890..a1b8be90f 100644 --- a/codegen/crm/quotes/models/BatchReadInputSimplePublicObjectId.ts +++ b/codegen/crm/quotes/models/BatchReadInputSimplePublicObjectId.ts @@ -14,6 +14,9 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; export class BatchReadInputSimplePublicObjectId { 'propertiesWithHistory': Array; + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; 'inputs': Array; 'properties': Array; diff --git a/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObject.ts b/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObject.ts new file mode 100644 index 000000000..d2a21d726 --- /dev/null +++ b/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObject.ts @@ -0,0 +1,78 @@ +/** + * Quotes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; + +export class BatchResponseSimplePublicUpsertObject { + 'completedAt': Date; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'status': BatchResponseSimplePublicUpsertObjectStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts b/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts new file mode 100644 index 000000000..ef5c5c9a6 --- /dev/null +++ b/codegen/crm/quotes/models/BatchResponseSimplePublicUpsertObjectWithErrors.ts @@ -0,0 +1,93 @@ +/** + * Quotes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; +import { StandardError } from '../models/StandardError'; + +export class BatchResponseSimplePublicUpsertObjectWithErrors { + 'completedAt': Date; + 'numErrors'?: number; + 'requestedAt'?: Date; + 'startedAt': Date; + 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "numErrors", + "baseName": "numErrors", + "type": "number", + "format": "int32" + }, + { + "name": "requestedAt", + "baseName": "requestedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BatchResponseSimplePublicUpsertObjectWithErrors.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum { + Pending = 'PENDING', + Processing = 'PROCESSING', + Canceled = 'CANCELED', + Complete = 'COMPLETE' +} + diff --git a/codegen/crm/quotes/models/ObjectSerializer.ts b/codegen/crm/quotes/models/ObjectSerializer.ts index 78bbe565d..78b31f8f7 100644 --- a/codegen/crm/quotes/models/ObjectSerializer.ts +++ b/codegen/crm/quotes/models/ObjectSerializer.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId'; export * from '../models/AssociationSpec'; export * from '../models/BatchInputSimplePublicObjectBatchInput'; +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; export * from '../models/BatchInputSimplePublicObjectId'; export * from '../models/BatchInputSimplePublicObjectInputForCreate'; export * from '../models/BatchReadInputSimplePublicObjectId'; export * from '../models/BatchResponseSimplePublicObject'; export * from '../models/BatchResponseSimplePublicObjectWithErrors'; +export * from '../models/BatchResponseSimplePublicUpsertObject'; +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; export * from '../models/CollectionResponseAssociatedId'; export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -18,27 +21,30 @@ export * from '../models/NextPage'; export * from '../models/Paging'; export * from '../models/PreviousPage'; export * from '../models/PublicAssociationsForObject'; -export * from '../models/PublicGdprDeleteInput'; -export * from '../models/PublicMergeInput'; export * from '../models/PublicObjectId'; export * from '../models/PublicObjectSearchRequest'; export * from '../models/SimplePublicObject'; export * from '../models/SimplePublicObjectBatchInput'; +export * from '../models/SimplePublicObjectBatchInputUpsert'; export * from '../models/SimplePublicObjectId'; export * from '../models/SimplePublicObjectInput'; export * from '../models/SimplePublicObjectInputForCreate'; export * from '../models/SimplePublicObjectWithAssociations'; +export * from '../models/SimplePublicUpsertObject'; export * from '../models/StandardError'; export * from '../models/ValueWithTimestamp'; import { AssociatedId } from '../models/AssociatedId'; import { AssociationSpec } from '../models/AssociationSpec'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseAssociatedId } from '../models/CollectionResponseAssociatedId'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; @@ -51,16 +57,16 @@ import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; import { PublicAssociationsForObject } from '../models/PublicAssociationsForObject'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectId } from '../models/PublicObjectId'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectBatchInput } from '../models/SimplePublicObjectBatchInput'; +import { SimplePublicObjectBatchInputUpsert } from '../models/SimplePublicObjectBatchInputUpsert'; import { SimplePublicObjectId } from '../models/SimplePublicObjectId'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; import { SimplePublicObjectInputForCreate } from '../models/SimplePublicObjectInputForCreate'; import { SimplePublicObjectWithAssociations } from '../models/SimplePublicObjectWithAssociations'; +import { SimplePublicUpsertObject } from '../models/SimplePublicUpsertObject'; import { StandardError } from '../models/StandardError'; import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; @@ -80,6 +86,8 @@ let enumsMap: Set = new Set([ "AssociationSpecAssociationCategoryEnum", "BatchResponseSimplePublicObjectStatusEnum", "BatchResponseSimplePublicObjectWithErrorsStatusEnum", + "BatchResponseSimplePublicUpsertObjectStatusEnum", + "BatchResponseSimplePublicUpsertObjectWithErrorsStatusEnum", "FilterOperatorEnum", ]); @@ -87,11 +95,14 @@ let typeMap: {[index: string]: any} = { "AssociatedId": AssociatedId, "AssociationSpec": AssociationSpec, "BatchInputSimplePublicObjectBatchInput": BatchInputSimplePublicObjectBatchInput, + "BatchInputSimplePublicObjectBatchInputUpsert": BatchInputSimplePublicObjectBatchInputUpsert, "BatchInputSimplePublicObjectId": BatchInputSimplePublicObjectId, "BatchInputSimplePublicObjectInputForCreate": BatchInputSimplePublicObjectInputForCreate, "BatchReadInputSimplePublicObjectId": BatchReadInputSimplePublicObjectId, "BatchResponseSimplePublicObject": BatchResponseSimplePublicObject, "BatchResponseSimplePublicObjectWithErrors": BatchResponseSimplePublicObjectWithErrors, + "BatchResponseSimplePublicUpsertObject": BatchResponseSimplePublicUpsertObject, + "BatchResponseSimplePublicUpsertObjectWithErrors": BatchResponseSimplePublicUpsertObjectWithErrors, "CollectionResponseAssociatedId": CollectionResponseAssociatedId, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging": CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, "CollectionResponseWithTotalSimplePublicObjectForwardPaging": CollectionResponseWithTotalSimplePublicObjectForwardPaging, @@ -104,16 +115,16 @@ let typeMap: {[index: string]: any} = { "Paging": Paging, "PreviousPage": PreviousPage, "PublicAssociationsForObject": PublicAssociationsForObject, - "PublicGdprDeleteInput": PublicGdprDeleteInput, - "PublicMergeInput": PublicMergeInput, "PublicObjectId": PublicObjectId, "PublicObjectSearchRequest": PublicObjectSearchRequest, "SimplePublicObject": SimplePublicObject, "SimplePublicObjectBatchInput": SimplePublicObjectBatchInput, + "SimplePublicObjectBatchInputUpsert": SimplePublicObjectBatchInputUpsert, "SimplePublicObjectId": SimplePublicObjectId, "SimplePublicObjectInput": SimplePublicObjectInput, "SimplePublicObjectInputForCreate": SimplePublicObjectInputForCreate, "SimplePublicObjectWithAssociations": SimplePublicObjectWithAssociations, + "SimplePublicUpsertObject": SimplePublicUpsertObject, "StandardError": StandardError, "ValueWithTimestamp": ValueWithTimestamp, } diff --git a/codegen/crm/quotes/models/PublicMergeInput.ts b/codegen/crm/quotes/models/PublicMergeInput.ts deleted file mode 100644 index 89b7ea3e2..000000000 --- a/codegen/crm/quotes/models/PublicMergeInput.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Quotes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PublicMergeInput { - 'objectIdToMerge': string; - 'primaryObjectId': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "objectIdToMerge", - "baseName": "objectIdToMerge", - "type": "string", - "format": "" - }, - { - "name": "primaryObjectId", - "baseName": "primaryObjectId", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PublicMergeInput.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/codegen/crm/quotes/models/PublicObjectSearchRequest.ts b/codegen/crm/quotes/models/PublicObjectSearchRequest.ts index 0dd209e88..988ecfb9a 100644 --- a/codegen/crm/quotes/models/PublicObjectSearchRequest.ts +++ b/codegen/crm/quotes/models/PublicObjectSearchRequest.ts @@ -14,11 +14,11 @@ import { FilterGroup } from '../models/FilterGroup'; export class PublicObjectSearchRequest { 'query'?: string; - 'limit': number; - 'after': string; - 'sorts': Array; - 'properties': Array; - 'filterGroups': Array; + 'limit'?: number; + 'after'?: string; + 'sorts'?: Array; + 'properties'?: Array; + 'filterGroups'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/quotes/models/SimplePublicObjectBatchInput.ts b/codegen/crm/quotes/models/SimplePublicObjectBatchInput.ts index 73f169acd..d6bfa41be 100644 --- a/codegen/crm/quotes/models/SimplePublicObjectBatchInput.ts +++ b/codegen/crm/quotes/models/SimplePublicObjectBatchInput.ts @@ -12,7 +12,14 @@ export class SimplePublicObjectBatchInput { + /** + * The name of a property whose values are unique for this object + */ 'idProperty'?: string; + 'objectWriteTraceId'?: string; + /** + * The id to be updated. This can be the object id, or the unique property value of the idProperty property + */ 'id': string; 'properties': { [key: string]: string; }; @@ -25,6 +32,12 @@ export class SimplePublicObjectBatchInput { "type": "string", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", diff --git a/codegen/crm/quotes/models/SimplePublicObjectBatchInputUpsert.ts b/codegen/crm/quotes/models/SimplePublicObjectBatchInputUpsert.ts new file mode 100644 index 000000000..028a0c23a --- /dev/null +++ b/codegen/crm/quotes/models/SimplePublicObjectBatchInputUpsert.ts @@ -0,0 +1,58 @@ +/** + * Quotes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class SimplePublicObjectBatchInputUpsert { + /** + * The name of a property whose values are unique for this object + */ + 'idProperty'?: string; + 'objectWriteTraceId'?: string; + 'id': string; + 'properties': { [key: string]: string; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "idProperty", + "baseName": "idProperty", + "type": "string", + "format": "" + }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SimplePublicObjectBatchInputUpsert.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/quotes/models/SimplePublicObjectInput.ts b/codegen/crm/quotes/models/SimplePublicObjectInput.ts index 08320d3b0..62aee27a5 100644 --- a/codegen/crm/quotes/models/SimplePublicObjectInput.ts +++ b/codegen/crm/quotes/models/SimplePublicObjectInput.ts @@ -12,11 +12,18 @@ export class SimplePublicObjectInput { + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/quotes/models/SimplePublicObjectInputForCreate.ts b/codegen/crm/quotes/models/SimplePublicObjectInputForCreate.ts index 4ccbbb95d..02b47a371 100644 --- a/codegen/crm/quotes/models/SimplePublicObjectInputForCreate.ts +++ b/codegen/crm/quotes/models/SimplePublicObjectInputForCreate.ts @@ -14,6 +14,7 @@ import { PublicAssociationsForObject } from '../models/PublicAssociationsForObje export class SimplePublicObjectInputForCreate { 'associations': Array; + 'objectWriteTraceId'?: string; 'properties': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; @@ -25,6 +26,12 @@ export class SimplePublicObjectInputForCreate { "type": "Array", "format": "" }, + { + "name": "objectWriteTraceId", + "baseName": "objectWriteTraceId", + "type": "string", + "format": "" + }, { "name": "properties", "baseName": "properties", diff --git a/codegen/crm/quotes/models/SimplePublicUpsertObject.ts b/codegen/crm/quotes/models/SimplePublicUpsertObject.ts new file mode 100644 index 000000000..65747f500 --- /dev/null +++ b/codegen/crm/quotes/models/SimplePublicUpsertObject.ts @@ -0,0 +1,84 @@ +/** + * Quotes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueWithTimestamp } from '../models/ValueWithTimestamp'; + +export class SimplePublicUpsertObject { + 'createdAt': Date; + 'archived'?: boolean; + 'archivedAt'?: Date; + '_new': boolean; + 'propertiesWithHistory'?: { [key: string]: Array; }; + 'id': string; + 'properties': { [key: string]: string; }; + 'updatedAt': Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "archived", + "baseName": "archived", + "type": "boolean", + "format": "" + }, + { + "name": "archivedAt", + "baseName": "archivedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "_new", + "baseName": "new", + "type": "boolean", + "format": "" + }, + { + "name": "propertiesWithHistory", + "baseName": "propertiesWithHistory", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return SimplePublicUpsertObject.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/crm/quotes/models/all.ts b/codegen/crm/quotes/models/all.ts index 16a8dee1d..d6ec2bc65 100644 --- a/codegen/crm/quotes/models/all.ts +++ b/codegen/crm/quotes/models/all.ts @@ -1,11 +1,14 @@ export * from '../models/AssociatedId' export * from '../models/AssociationSpec' export * from '../models/BatchInputSimplePublicObjectBatchInput' +export * from '../models/BatchInputSimplePublicObjectBatchInputUpsert' export * from '../models/BatchInputSimplePublicObjectId' export * from '../models/BatchInputSimplePublicObjectInputForCreate' export * from '../models/BatchReadInputSimplePublicObjectId' export * from '../models/BatchResponseSimplePublicObject' export * from '../models/BatchResponseSimplePublicObjectWithErrors' +export * from '../models/BatchResponseSimplePublicUpsertObject' +export * from '../models/BatchResponseSimplePublicUpsertObjectWithErrors' export * from '../models/CollectionResponseAssociatedId' export * from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging' export * from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging' @@ -18,15 +21,15 @@ export * from '../models/NextPage' export * from '../models/Paging' export * from '../models/PreviousPage' export * from '../models/PublicAssociationsForObject' -export * from '../models/PublicGdprDeleteInput' -export * from '../models/PublicMergeInput' export * from '../models/PublicObjectId' export * from '../models/PublicObjectSearchRequest' export * from '../models/SimplePublicObject' export * from '../models/SimplePublicObjectBatchInput' +export * from '../models/SimplePublicObjectBatchInputUpsert' export * from '../models/SimplePublicObjectId' export * from '../models/SimplePublicObjectInput' export * from '../models/SimplePublicObjectInputForCreate' export * from '../models/SimplePublicObjectWithAssociations' +export * from '../models/SimplePublicUpsertObject' export * from '../models/StandardError' export * from '../models/ValueWithTimestamp' diff --git a/codegen/crm/quotes/types/ObjectParamAPI.ts b/codegen/crm/quotes/types/ObjectParamAPI.ts index 2ce16d6c3..23929520b 100644 --- a/codegen/crm/quotes/types/ObjectParamAPI.ts +++ b/codegen/crm/quotes/types/ObjectParamAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -281,6 +282,15 @@ export interface BatchApiUpdateRequest { batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput } +export interface BatchApiUpsertRequest { + /** + * + * @type BatchInputSimplePublicObjectBatchInputUpsert + * @memberof BatchApiupsert + */ + batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert +} + export class ObjectBatchApi { private api: ObservableBatchApi @@ -337,7 +347,7 @@ export class ObjectBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param param the request object */ public updateWithHttpInfo(param: BatchApiUpdateRequest, options?: Configuration): Promise> { @@ -345,87 +355,29 @@ export class ObjectBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param param the request object */ public update(param: BatchApiUpdateRequest, options?: Configuration): Promise { return this.api.update(param.batchInputSimplePublicObjectBatchInput, options).toPromise(); } -} - -import { ObservableGDPRApi } from "./ObservableAPI"; -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; - -export interface GDPRApiPurgeRequest { - /** - * - * @type PublicGdprDeleteInput - * @memberof GDPRApipurge - */ - publicGdprDeleteInput: PublicGdprDeleteInput -} - -export class ObjectGDPRApi { - private api: ObservableGDPRApi - - public constructor(configuration: Configuration, requestFactory?: GDPRApiRequestFactory, responseProcessor?: GDPRApiResponseProcessor) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purgeWithHttpInfo(param: GDPRApiPurgeRequest, options?: Configuration): Promise> { - return this.api.purgeWithHttpInfo(param.publicGdprDeleteInput, options).toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param param the request object - */ - public purge(param: GDPRApiPurgeRequest, options?: Configuration): Promise { - return this.api.purge(param.publicGdprDeleteInput, options).toPromise(); - } - -} - -import { ObservablePublicObjectApi } from "./ObservableAPI"; -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; - -export interface PublicObjectApiMergeRequest { - /** - * - * @type PublicMergeInput - * @memberof PublicObjectApimerge - */ - publicMergeInput: PublicMergeInput -} - -export class ObjectPublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two quotes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values * @param param the request object */ - public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise> { - return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise(); + public upsertWithHttpInfo(param: BatchApiUpsertRequest, options?: Configuration): Promise> { + return this.api.upsertWithHttpInfo(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } /** - * Merge two quotes with same type + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values * @param param the request object */ - public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise { - return this.api.merge(param.publicMergeInput, options).toPromise(); + public upsert(param: BatchApiUpsertRequest, options?: Configuration): Promise { + return this.api.upsert(param.batchInputSimplePublicObjectBatchInputUpsert, options).toPromise(); } } diff --git a/codegen/crm/quotes/types/ObservableAPI.ts b/codegen/crm/quotes/types/ObservableAPI.ts index 2c26cf4be..c6980e959 100644 --- a/codegen/crm/quotes/types/ObservableAPI.ts +++ b/codegen/crm/quotes/types/ObservableAPI.ts @@ -3,15 +3,16 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -337,7 +338,7 @@ export class ObservableBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable> { @@ -360,88 +361,20 @@ export class ObservableBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Observable { return this.updateWithHttpInfo(batchInputSimplePublicObjectBatchInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } -} - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class ObservableGDPRApi { - private requestFactory: GDPRApiRequestFactory; - private responseProcessor: GDPRApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new GDPRApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new GDPRApiResponseProcessor(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.purge(publicGdprDeleteInput, _options); - - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.purgeWithHttpInfo(rsp))); - })); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Observable { - return this.purgeWithHttpInfo(publicGdprDeleteInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - -} - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class ObservablePublicObjectApi { - private requestFactory: PublicObjectApiRequestFactory; - private responseProcessor: PublicObjectApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor(); - } - /** - * Merge two quotes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable> { - const requestContextPromise = this.requestFactory.merge(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -455,16 +388,17 @@ export class ObservablePublicObjectApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeWithHttpInfo(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.upsertWithHttpInfo(rsp))); })); } /** - * Merge two quotes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Observable { - return this.mergeWithHttpInfo(publicMergeInput, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Observable { + return this.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } } diff --git a/codegen/crm/quotes/types/PromiseAPI.ts b/codegen/crm/quotes/types/PromiseAPI.ts index 613978ecd..16d852ec5 100644 --- a/codegen/crm/quotes/types/PromiseAPI.ts +++ b/codegen/crm/quotes/types/PromiseAPI.ts @@ -2,15 +2,16 @@ import { HttpInfo } from '../http/http'; import { Configuration} from '../configuration' import { BatchInputSimplePublicObjectBatchInput } from '../models/BatchInputSimplePublicObjectBatchInput'; +import { BatchInputSimplePublicObjectBatchInputUpsert } from '../models/BatchInputSimplePublicObjectBatchInputUpsert'; import { BatchInputSimplePublicObjectId } from '../models/BatchInputSimplePublicObjectId'; import { BatchInputSimplePublicObjectInputForCreate } from '../models/BatchInputSimplePublicObjectInputForCreate'; import { BatchReadInputSimplePublicObjectId } from '../models/BatchReadInputSimplePublicObjectId'; import { BatchResponseSimplePublicObject } from '../models/BatchResponseSimplePublicObject'; import { BatchResponseSimplePublicObjectWithErrors } from '../models/BatchResponseSimplePublicObjectWithErrors'; +import { BatchResponseSimplePublicUpsertObject } from '../models/BatchResponseSimplePublicUpsertObject'; +import { BatchResponseSimplePublicUpsertObjectWithErrors } from '../models/BatchResponseSimplePublicUpsertObjectWithErrors'; import { CollectionResponseSimplePublicObjectWithAssociationsForwardPaging } from '../models/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; import { CollectionResponseWithTotalSimplePublicObjectForwardPaging } from '../models/CollectionResponseWithTotalSimplePublicObjectForwardPaging'; -import { PublicGdprDeleteInput } from '../models/PublicGdprDeleteInput'; -import { PublicMergeInput } from '../models/PublicMergeInput'; import { PublicObjectSearchRequest } from '../models/PublicObjectSearchRequest'; import { SimplePublicObject } from '../models/SimplePublicObject'; import { SimplePublicObjectInput } from '../models/SimplePublicObjectInput'; @@ -230,7 +231,7 @@ export class PromiseBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public updateWithHttpInfo(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise> { @@ -239,7 +240,7 @@ export class PromiseBatchApi { } /** - * Update a batch of quotes + * Update a batch of quotes by internal ID, or unique property values * @param batchInputSimplePublicObjectBatchInput */ public update(batchInputSimplePublicObjectBatchInput: BatchInputSimplePublicObjectBatchInput, _options?: Configuration): Promise { @@ -247,79 +248,23 @@ export class PromiseBatchApi { return result.toPromise(); } - -} - - - -import { ObservableGDPRApi } from './ObservableAPI'; - -import { GDPRApiRequestFactory, GDPRApiResponseProcessor} from "../apis/GDPRApi"; -export class PromiseGDPRApi { - private api: ObservableGDPRApi - - public constructor( - configuration: Configuration, - requestFactory?: GDPRApiRequestFactory, - responseProcessor?: GDPRApiResponseProcessor - ) { - this.api = new ObservableGDPRApi(configuration, requestFactory, responseProcessor); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purgeWithHttpInfo(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise> { - const result = this.api.purgeWithHttpInfo(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - /** - * Permanently delete a contact and all associated content to follow GDPR. Use optional property \'idProperty\' set to \'email\' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. - * GDPR DELETE - * @param publicGdprDeleteInput - */ - public purge(publicGdprDeleteInput: PublicGdprDeleteInput, _options?: Configuration): Promise { - const result = this.api.purge(publicGdprDeleteInput, _options); - return result.toPromise(); - } - - -} - - - -import { ObservablePublicObjectApi } from './ObservableAPI'; - -import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi"; -export class PromisePublicObjectApi { - private api: ObservablePublicObjectApi - - public constructor( - configuration: Configuration, - requestFactory?: PublicObjectApiRequestFactory, - responseProcessor?: PublicObjectApiResponseProcessor - ) { - this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor); - } - /** - * Merge two quotes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public mergeWithHttpInfo(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise> { - const result = this.api.mergeWithHttpInfo(publicMergeInput, _options); + public upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise> { + const result = this.api.upsertWithHttpInfo(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } /** - * Merge two quotes with same type - * @param publicMergeInput + * Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object. + * Create or update a batch of quotes by unique property values + * @param batchInputSimplePublicObjectBatchInputUpsert */ - public merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise { - const result = this.api.merge(publicMergeInput, _options); + public upsert(batchInputSimplePublicObjectBatchInputUpsert: BatchInputSimplePublicObjectBatchInputUpsert, _options?: Configuration): Promise { + const result = this.api.upsert(batchInputSimplePublicObjectBatchInputUpsert, _options); return result.toPromise(); } diff --git a/codegen/crm/schemas/apis/CoreApi.ts b/codegen/crm/schemas/apis/CoreApi.ts index 0c1ac186e..7276e9ed8 100644 --- a/codegen/crm/schemas/apis/CoreApi.ts +++ b/codegen/crm/schemas/apis/CoreApi.ts @@ -38,7 +38,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}' + const localVarPath = '/crm-object-schemas/v3/schemas/{objectType}' .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); // Make Request Context @@ -88,7 +88,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}/associations/{associationIdentifier}' + const localVarPath = '/crm-object-schemas/v3/schemas/{objectType}/associations/{associationIdentifier}' .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))) .replace('{' + 'associationIdentifier' + '}', encodeURIComponent(String(associationIdentifier))); @@ -127,7 +127,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas'; + const localVarPath = '/crm-object-schemas/v3/schemas'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); @@ -182,7 +182,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}/associations' + const localVarPath = '/crm-object-schemas/v3/schemas/{objectType}/associations' .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); // Make Request Context @@ -226,7 +226,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas'; + const localVarPath = '/crm-object-schemas/v3/schemas'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); @@ -268,7 +268,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}' + const localVarPath = '/crm-object-schemas/v3/schemas/{objectType}' .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); // Make Request Context @@ -313,7 +313,7 @@ export class CoreApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}' + const localVarPath = '/crm-object-schemas/v3/schemas/{objectType}' .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); // Make Request Context diff --git a/codegen/crm/schemas/apis/PublicObjectSchemasApi.ts b/codegen/crm/schemas/apis/PublicObjectSchemasApi.ts deleted file mode 100644 index bd6a13887..000000000 --- a/codegen/crm/schemas/apis/PublicObjectSchemasApi.ts +++ /dev/null @@ -1,89 +0,0 @@ -// TODO: better import syntax? -import {BaseAPIRequestFactory, RequiredError} from './baseapi'; -import {Configuration} from '../configuration'; -import {RequestContext, HttpMethod, ResponseContext, HttpInfo} from '../http/http'; -import {ObjectSerializer} from '../models/ObjectSerializer'; -import {ApiException} from './exception'; -import { isCodeInRange} from '../util'; -import {SecurityAuthentication} from '../auth/auth'; - - - -/** - * no description - */ -export class PublicObjectSchemasApiRequestFactory extends BaseAPIRequestFactory { - - /** - * @param objectType - */ - public async purge(objectType: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'objectType' is not null or undefined - if (objectType === null || objectType === undefined) { - throw new RequiredError("PublicObjectSchemasApi", "purge", "objectType"); - } - - - // Path Params - const localVarPath = '/crm/v3/schemas/{objectType}/purge' - .replace('{' + 'objectType' + '}', encodeURIComponent(String(objectType))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class PublicObjectSchemasApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to purge - * @throws ApiException if the response code was not in [200, 299] - */ - public async purgeWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - -} diff --git a/codegen/crm/schemas/index.ts b/codegen/crm/schemas/index.ts index 8cc624bd9..573a08325 100644 --- a/codegen/crm/schemas/index.ts +++ b/codegen/crm/schemas/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseCoreApi as CoreApi, PromisePublicObjectSchemasApi as PublicObjectSchemasApi } from './types/PromiseAPI'; +export { PromiseCoreApi as CoreApi } from './types/PromiseAPI'; diff --git a/codegen/crm/schemas/models/AssociationDefinition.ts b/codegen/crm/schemas/models/AssociationDefinition.ts index 3f160e0d6..ad8c6896a 100644 --- a/codegen/crm/schemas/models/AssociationDefinition.ts +++ b/codegen/crm/schemas/models/AssociationDefinition.ts @@ -32,7 +32,7 @@ export class AssociationDefinition { */ 'id': string; /** - * ID of the target object type ID to link to. + * ID of the target object type to link to. */ 'toObjectTypeId': string; /** diff --git a/codegen/crm/schemas/models/AssociationDefinitionEgg.ts b/codegen/crm/schemas/models/AssociationDefinitionEgg.ts index 8712e0381..e9af6e866 100644 --- a/codegen/crm/schemas/models/AssociationDefinitionEgg.ts +++ b/codegen/crm/schemas/models/AssociationDefinitionEgg.ts @@ -24,7 +24,7 @@ export class AssociationDefinitionEgg { */ 'name'?: string; /** - * ID of the target object type ID to link to. + * ID of the target object type to link to. */ 'toObjectTypeId': string; diff --git a/codegen/crm/schemas/models/ObjectSchema.ts b/codegen/crm/schemas/models/ObjectSchema.ts index 63acd6b04..7fca84850 100644 --- a/codegen/crm/schemas/models/ObjectSchema.ts +++ b/codegen/crm/schemas/models/ObjectSchema.ts @@ -26,8 +26,10 @@ export class ObjectSchema { * The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. */ 'secondaryDisplayProperties'?: Array; + 'createdByUserId'?: number; 'objectTypeId'?: string; 'description'?: string; + 'updatedByUserId'?: number; /** * An assigned unique ID for the object, including portal ID and object name. */ @@ -82,6 +84,12 @@ export class ObjectSchema { "type": "Array", "format": "" }, + { + "name": "createdByUserId", + "baseName": "createdByUserId", + "type": "number", + "format": "int32" + }, { "name": "objectTypeId", "baseName": "objectTypeId", @@ -94,6 +102,12 @@ export class ObjectSchema { "type": "string", "format": "" }, + { + "name": "updatedByUserId", + "baseName": "updatedByUserId", + "type": "number", + "format": "int32" + }, { "name": "fullyQualifiedName", "baseName": "fullyQualifiedName", diff --git a/codegen/crm/schemas/models/ObjectSerializer.ts b/codegen/crm/schemas/models/ObjectSerializer.ts index 4f5a1b4d0..9d90642ac 100644 --- a/codegen/crm/schemas/models/ObjectSerializer.ts +++ b/codegen/crm/schemas/models/ObjectSerializer.ts @@ -27,7 +27,7 @@ import { ObjectTypeDefinitionPatch } from '../models/ObjectTypeDefinitionPatch'; import { ObjectTypePropertyCreate } from '../models/ObjectTypePropertyCreate'; import { Option } from '../models/Option'; import { OptionInput } from '../models/OptionInput'; -import { Property } from '../models/Property'; +import { Property } from '../models/Property'; import { PropertyModificationMetadata } from '../models/PropertyModificationMetadata'; /* tslint:disable:no-unused-variable */ @@ -47,6 +47,7 @@ let enumsMap: Set = new Set([ "ObjectTypePropertyCreateTypeEnum", "ObjectTypePropertyCreateTextDisplayHintEnum", "ObjectTypePropertyCreateNumberDisplayHintEnum", + "PropertyDataSensitivityEnum", ]); let typeMap: {[index: string]: any} = { diff --git a/codegen/crm/schemas/models/ObjectTypeDefinitionPatch.ts b/codegen/crm/schemas/models/ObjectTypeDefinitionPatch.ts index da2214ca0..b712cd5eb 100644 --- a/codegen/crm/schemas/models/ObjectTypeDefinitionPatch.ts +++ b/codegen/crm/schemas/models/ObjectTypeDefinitionPatch.ts @@ -28,6 +28,7 @@ export class ObjectTypeDefinitionPatch { * Names of properties that will be indexed for this object type in by HubSpot\'s product search. */ 'searchableProperties'?: Array; + 'clearDescription'?: boolean; /** * The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. */ @@ -57,6 +58,12 @@ export class ObjectTypeDefinitionPatch { "type": "Array", "format": "" }, + { + "name": "clearDescription", + "baseName": "clearDescription", + "type": "boolean", + "format": "" + }, { "name": "primaryDisplayProperty", "baseName": "primaryDisplayProperty", diff --git a/codegen/crm/schemas/models/Property.ts b/codegen/crm/schemas/models/Property.ts index 5d1d41a10..cc7e7316c 100644 --- a/codegen/crm/schemas/models/Property.ts +++ b/codegen/crm/schemas/models/Property.ts @@ -17,12 +17,7 @@ import { PropertyModificationMetadata } from '../models/PropertyModificationMeta * Defines a property */ export class Property { - /** - * The internal ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot. - */ - 'createdUserId'?: string; 'hidden'?: boolean; - 'modificationMetadata'?: PropertyModificationMetadata; /** * The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed **after** any positive values. */ @@ -36,10 +31,6 @@ export class Property { */ 'showCurrencySymbol'?: boolean; /** - * A human-readable property label that will be shown in HubSpot. - */ - 'label': string; - /** * The property data type. */ 'type': string; @@ -48,22 +39,53 @@ export class Property { */ 'hubspotDefined'?: boolean; /** - * Whether or not the property can be used in a HubSpot form. - */ - 'formField'?: boolean; - /** * When the property was created */ 'createdAt'?: Date; /** - * When the property was archived. - */ - 'archivedAt'?: Date; - /** * Whether or not the property is archived. */ 'archived'?: boolean; /** + * A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types. + */ + 'options': Array