@polar-sh/sdk 0.17.4 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +106 -0
- package/README.md +181 -30
- package/RUNTIMES.md +22 -0
- package/docs/sdks/checkouts/README.md +1 -1
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +3 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/benefit.d.ts +2 -3
- package/models/components/benefit.d.ts.map +1 -1
- package/models/components/benefit.js +0 -3
- package/models/components/benefit.js.map +1 -1
- package/models/components/benefitadssubscriber.d.ts +7 -7
- package/models/components/benefitadssubscriber.d.ts.map +1 -1
- package/models/components/benefitadssubscriber.js +11 -11
- package/models/components/benefitadssubscriber.js.map +1 -1
- package/models/components/benefitgrant.d.ts +4 -5
- package/models/components/benefitgrant.d.ts.map +1 -1
- package/models/components/benefitgrant.js +0 -5
- package/models/components/benefitgrant.js.map +1 -1
- package/models/components/benefitgrantwebhook.d.ts +8 -9
- package/models/components/benefitgrantwebhook.d.ts.map +1 -1
- package/models/components/benefitgrantwebhook.js +0 -9
- package/models/components/benefitgrantwebhook.js.map +1 -1
- package/models/components/benefittype.d.ts +0 -3
- package/models/components/benefittype.d.ts.map +1 -1
- package/models/components/benefittype.js +0 -1
- package/models/components/benefittype.js.map +1 -1
- package/models/components/checkoutlinkproduct.d.ts +2 -24
- package/models/components/checkoutlinkproduct.d.ts.map +1 -1
- package/models/components/checkoutlinkproduct.js +3 -27
- package/models/components/checkoutlinkproduct.js.map +1 -1
- package/models/components/checkoutproduct.d.ts +2 -24
- package/models/components/checkoutproduct.d.ts.map +1 -1
- package/models/components/checkoutproduct.js +3 -27
- package/models/components/checkoutproduct.js.map +1 -1
- package/models/components/index.d.ts +0 -15
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -15
- package/models/components/index.js.map +1 -1
- package/models/components/listresourceuserbenefit.d.ts +0 -9
- package/models/components/listresourceuserbenefit.d.ts.map +1 -1
- package/models/components/listresourceuserbenefit.js +0 -13
- package/models/components/listresourceuserbenefit.js.map +1 -1
- package/models/components/oauth2client.js +2 -2
- package/models/components/oauth2client.js.map +1 -1
- package/models/components/oauth2clientconfiguration.js +2 -2
- package/models/components/oauth2clientconfiguration.js.map +1 -1
- package/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/models/components/organizationfeaturesettings.d.ts +0 -5
- package/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/models/components/organizationfeaturesettings.js +0 -4
- package/models/components/organizationfeaturesettings.js.map +1 -1
- package/models/components/scope.d.ts +0 -6
- package/models/components/scope.d.ts.map +1 -1
- package/models/components/scope.js +0 -2
- package/models/components/scope.js.map +1 -1
- package/models/components/userorderproduct.d.ts +2 -24
- package/models/components/userorderproduct.d.ts.map +1 -1
- package/models/components/userorderproduct.js +3 -27
- package/models/components/userorderproduct.js.map +1 -1
- package/models/components/usersubscriptionproduct.d.ts +2 -24
- package/models/components/usersubscriptionproduct.d.ts.map +1 -1
- package/models/components/usersubscriptionproduct.js +3 -27
- package/models/components/usersubscriptionproduct.js.map +1 -1
- package/models/operations/benefitsupdate.d.ts +4 -4
- package/models/operations/benefitsupdate.d.ts.map +1 -1
- package/models/operations/benefitsupdate.js +0 -4
- package/models/operations/benefitsupdate.js.map +1 -1
- package/models/operations/index.d.ts +0 -8
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -8
- package/models/operations/index.js.map +1 -1
- package/models/operations/usersbenefitsget.d.ts +2 -6
- package/models/operations/usersbenefitsget.d.ts.map +1 -1
- package/models/operations/usersbenefitsget.js +0 -6
- package/models/operations/usersbenefitsget.js.map +1 -1
- package/package.json +1 -3
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -5
- package/sdk/sdk.js.map +1 -1
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +9 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/benefit.ts +0 -10
- package/src/models/components/benefitadssubscriber.ts +12 -15
- package/src/models/components/benefitgrant.ts +0 -14
- package/src/models/components/benefitgrantwebhook.ts +0 -22
- package/src/models/components/benefittype.ts +0 -1
- package/src/models/components/checkoutlinkproduct.ts +4 -68
- package/src/models/components/checkoutproduct.ts +4 -66
- package/src/models/components/index.ts +0 -15
- package/src/models/components/listresourceuserbenefit.ts +0 -30
- package/src/models/components/oauth2client.ts +2 -2
- package/src/models/components/oauth2clientconfiguration.ts +2 -2
- package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
- package/src/models/components/organizationfeaturesettings.ts +0 -9
- package/src/models/components/scope.ts +0 -2
- package/src/models/components/userorderproduct.ts +4 -60
- package/src/models/components/usersubscriptionproduct.ts +4 -68
- package/src/models/operations/benefitsupdate.ts +0 -8
- package/src/models/operations/index.ts +0 -8
- package/src/models/operations/usersbenefitsget.ts +0 -12
- package/src/sdk/sdk.ts +0 -6
- package/src/types/index.ts +1 -0
- package/src/types/webhooks.ts +7 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/webhooks.d.ts +4 -0
- package/types/webhooks.d.ts.map +1 -0
- package/types/webhooks.js +6 -0
- package/types/webhooks.js.map +1 -0
- package/docs/sdks/articles/README.md +0 -724
- package/funcs/articlesCreate.d.ts +0 -16
- package/funcs/articlesCreate.d.ts.map +0 -1
- package/funcs/articlesCreate.js +0 -99
- package/funcs/articlesCreate.js.map +0 -1
- package/funcs/articlesDelete.d.ts +0 -16
- package/funcs/articlesDelete.d.ts.map +0 -1
- package/funcs/articlesDelete.js +0 -105
- package/funcs/articlesDelete.js.map +0 -1
- package/funcs/articlesExport.d.ts +0 -16
- package/funcs/articlesExport.d.ts.map +0 -1
- package/funcs/articlesExport.js +0 -103
- package/funcs/articlesExport.js.map +0 -1
- package/funcs/articlesGet.d.ts +0 -17
- package/funcs/articlesGet.d.ts.map +0 -1
- package/funcs/articlesGet.js +0 -105
- package/funcs/articlesGet.js.map +0 -1
- package/funcs/articlesList.d.ts +0 -19
- package/funcs/articlesList.d.ts.map +0 -1
- package/funcs/articlesList.js +0 -138
- package/funcs/articlesList.js.map +0 -1
- package/funcs/articlesPreview.d.ts +0 -16
- package/funcs/articlesPreview.d.ts.map +0 -1
- package/funcs/articlesPreview.js +0 -106
- package/funcs/articlesPreview.js.map +0 -1
- package/funcs/articlesReceivers.d.ts +0 -17
- package/funcs/articlesReceivers.d.ts.map +0 -1
- package/funcs/articlesReceivers.js +0 -105
- package/funcs/articlesReceivers.js.map +0 -1
- package/funcs/articlesSend.d.ts +0 -16
- package/funcs/articlesSend.d.ts.map +0 -1
- package/funcs/articlesSend.js +0 -105
- package/funcs/articlesSend.js.map +0 -1
- package/funcs/articlesUpdate.d.ts +0 -17
- package/funcs/articlesUpdate.d.ts.map +0 -1
- package/funcs/articlesUpdate.js +0 -106
- package/funcs/articlesUpdate.js.map +0 -1
- package/models/components/article.d.ts +0 -68
- package/models/components/article.d.ts.map +0 -1
- package/models/components/article.js +0 -129
- package/models/components/article.js.map +0 -1
- package/models/components/articlebyline.d.ts +0 -28
- package/models/components/articlebyline.d.ts.map +0 -1
- package/models/components/articlebyline.js +0 -50
- package/models/components/articlebyline.js.map +0 -1
- package/models/components/articlecreate.d.ts +0 -93
- package/models/components/articlecreate.d.ts.map +0 -1
- package/models/components/articlecreate.js +0 -112
- package/models/components/articlecreate.js.map +0 -1
- package/models/components/articlepreview.d.ts +0 -32
- package/models/components/articlepreview.d.ts.map +0 -1
- package/models/components/articlepreview.js +0 -59
- package/models/components/articlepreview.js.map +0 -1
- package/models/components/articlereceivers.d.ts +0 -33
- package/models/components/articlereceivers.d.ts.map +0 -1
- package/models/components/articlereceivers.js +0 -76
- package/models/components/articlereceivers.js.map +0 -1
- package/models/components/articleupdate.d.ts +0 -85
- package/models/components/articleupdate.d.ts.map +0 -1
- package/models/components/articleupdate.js +0 -108
- package/models/components/articleupdate.js.map +0 -1
- package/models/components/articlevisibility.d.ts +0 -31
- package/models/components/articlevisibility.d.ts.map +0 -1
- package/models/components/articlevisibility.js +0 -51
- package/models/components/articlevisibility.js.map +0 -1
- package/models/components/benefitarticles.d.ts +0 -100
- package/models/components/benefitarticles.d.ts.map +0 -1
- package/models/components/benefitarticles.js +0 -107
- package/models/components/benefitarticles.js.map +0 -1
- package/models/components/benefitarticlesproperties.d.ts +0 -35
- package/models/components/benefitarticlesproperties.d.ts.map +0 -1
- package/models/components/benefitarticlesproperties.js +0 -68
- package/models/components/benefitarticlesproperties.js.map +0 -1
- package/models/components/benefitarticlessubscriber.d.ts +0 -99
- package/models/components/benefitarticlessubscriber.d.ts.map +0 -1
- package/models/components/benefitarticlessubscriber.js +0 -113
- package/models/components/benefitarticlessubscriber.js.map +0 -1
- package/models/components/benefitarticlessubscriberproperties.d.ts +0 -35
- package/models/components/benefitarticlessubscriberproperties.d.ts.map +0 -1
- package/models/components/benefitarticlessubscriberproperties.js +0 -68
- package/models/components/benefitarticlessubscriberproperties.js.map +0 -1
- package/models/components/benefitarticlesupdate.d.ts +0 -57
- package/models/components/benefitarticlesupdate.d.ts.map +0 -1
- package/models/components/benefitarticlesupdate.js +0 -79
- package/models/components/benefitarticlesupdate.js.map +0 -1
- package/models/components/benefitgrantarticlesproperties.d.ts +0 -25
- package/models/components/benefitgrantarticlesproperties.d.ts.map +0 -1
- package/models/components/benefitgrantarticlesproperties.js +0 -55
- package/models/components/benefitgrantarticlesproperties.js.map +0 -1
- package/models/components/bylineprofile.d.ts +0 -31
- package/models/components/bylineprofile.d.ts.map +0 -1
- package/models/components/bylineprofile.js +0 -70
- package/models/components/bylineprofile.js.map +0 -1
- package/models/components/listresourcearticle.d.ts +0 -33
- package/models/components/listresourcearticle.d.ts.map +0 -1
- package/models/components/listresourcearticle.js +0 -63
- package/models/components/listresourcearticle.js.map +0 -1
- package/models/operations/articlesdelete.d.ts +0 -29
- package/models/operations/articlesdelete.d.ts.map +0 -1
- package/models/operations/articlesdelete.js +0 -59
- package/models/operations/articlesdelete.js.map +0 -1
- package/models/operations/articlesexport.d.ts +0 -29
- package/models/operations/articlesexport.d.ts.map +0 -1
- package/models/operations/articlesexport.js +0 -68
- package/models/operations/articlesexport.js.map +0 -1
- package/models/operations/articlesget.d.ts +0 -29
- package/models/operations/articlesget.d.ts.map +0 -1
- package/models/operations/articlesget.js +0 -59
- package/models/operations/articlesget.js.map +0 -1
- package/models/operations/articleslist.d.ts +0 -141
- package/models/operations/articleslist.d.ts.map +0 -1
- package/models/operations/articleslist.js +0 -184
- package/models/operations/articleslist.js.map +0 -1
- package/models/operations/articlespreview.d.ts +0 -32
- package/models/operations/articlespreview.d.ts.map +0 -1
- package/models/operations/articlespreview.js +0 -71
- package/models/operations/articlespreview.js.map +0 -1
- package/models/operations/articlesreceivers.d.ts +0 -29
- package/models/operations/articlesreceivers.d.ts.map +0 -1
- package/models/operations/articlesreceivers.js +0 -59
- package/models/operations/articlesreceivers.js.map +0 -1
- package/models/operations/articlessend.d.ts +0 -29
- package/models/operations/articlessend.d.ts.map +0 -1
- package/models/operations/articlessend.js +0 -59
- package/models/operations/articlessend.js.map +0 -1
- package/models/operations/articlesupdate.d.ts +0 -32
- package/models/operations/articlesupdate.d.ts.map +0 -1
- package/models/operations/articlesupdate.js +0 -71
- package/models/operations/articlesupdate.js.map +0 -1
- package/sdk/articles.d.ts +0 -72
- package/sdk/articles.d.ts.map +0 -1
- package/sdk/articles.js +0 -103
- package/sdk/articles.js.map +0 -1
- package/src/funcs/articlesCreate.ts +0 -131
- package/src/funcs/articlesDelete.ts +0 -144
- package/src/funcs/articlesExport.ts +0 -136
- package/src/funcs/articlesGet.ts +0 -141
- package/src/funcs/articlesList.ts +0 -205
- package/src/funcs/articlesPreview.ts +0 -145
- package/src/funcs/articlesReceivers.ts +0 -138
- package/src/funcs/articlesSend.ts +0 -144
- package/src/funcs/articlesUpdate.ts +0 -145
- package/src/models/components/article.ts +0 -187
- package/src/models/components/articlebyline.ts +0 -33
- package/src/models/components/articlecreate.ts +0 -191
- package/src/models/components/articlepreview.ts +0 -65
- package/src/models/components/articlereceivers.ts +0 -87
- package/src/models/components/articleupdate.ts +0 -179
- package/src/models/components/articlevisibility.ts +0 -34
- package/src/models/components/benefitarticles.ts +0 -175
- package/src/models/components/benefitarticlesproperties.ts +0 -81
- package/src/models/components/benefitarticlessubscriber.ts +0 -189
- package/src/models/components/benefitarticlessubscriberproperties.ts +0 -86
- package/src/models/components/benefitarticlesupdate.ts +0 -102
- package/src/models/components/benefitgrantarticlesproperties.ts +0 -60
- package/src/models/components/bylineprofile.ts +0 -75
- package/src/models/components/listresourcearticle.ts +0 -82
- package/src/models/operations/articlesdelete.ts +0 -66
- package/src/models/operations/articlesexport.ts +0 -75
- package/src/models/operations/articlesget.ts +0 -66
- package/src/models/operations/articleslist.ts +0 -342
- package/src/models/operations/articlespreview.ts +0 -80
- package/src/models/operations/articlesreceivers.ts +0 -66
- package/src/models/operations/articlessend.ts +0 -66
- package/src/models/operations/articlesupdate.ts +0 -80
- package/src/sdk/articles.ts +0 -173
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type ArticlesSendRequest = {
|
|
5
|
-
id: string;
|
|
6
|
-
};
|
|
7
|
-
/** @internal */
|
|
8
|
-
export declare const ArticlesSendRequest$inboundSchema: z.ZodType<ArticlesSendRequest, z.ZodTypeDef, unknown>;
|
|
9
|
-
/** @internal */
|
|
10
|
-
export type ArticlesSendRequest$Outbound = {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
/** @internal */
|
|
14
|
-
export declare const ArticlesSendRequest$outboundSchema: z.ZodType<ArticlesSendRequest$Outbound, z.ZodTypeDef, ArticlesSendRequest>;
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
-
*/
|
|
19
|
-
export declare namespace ArticlesSendRequest$ {
|
|
20
|
-
/** @deprecated use `ArticlesSendRequest$inboundSchema` instead. */
|
|
21
|
-
const inboundSchema: z.ZodType<ArticlesSendRequest, z.ZodTypeDef, unknown>;
|
|
22
|
-
/** @deprecated use `ArticlesSendRequest$outboundSchema` instead. */
|
|
23
|
-
const outboundSchema: z.ZodType<ArticlesSendRequest$Outbound, z.ZodTypeDef, ArticlesSendRequest>;
|
|
24
|
-
/** @deprecated use `ArticlesSendRequest$Outbound` instead. */
|
|
25
|
-
type Outbound = ArticlesSendRequest$Outbound;
|
|
26
|
-
}
|
|
27
|
-
export declare function articlesSendRequestToJSON(articlesSendRequest: ArticlesSendRequest): string;
|
|
28
|
-
export declare function articlesSendRequestFromJSON(jsonString: string): SafeParseResult<ArticlesSendRequest, SDKValidationError>;
|
|
29
|
-
//# sourceMappingURL=articlessend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articlessend.d.ts","sourceRoot":"","sources":["../../src/models/operations/articlessend.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,mBAAmB,CAGnB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,oBAAoB,CAAC;IACpC,mEAAmE;IAC5D,MAAM,aAAa,uDAAoC,CAAC;IAC/D,oEAAoE;IAC7D,MAAM,cAAc,4EAAqC,CAAC;IACjE,8DAA8D;IAC9D,KAAY,QAAQ,GAAG,4BAA4B,CAAC;CACrD;AAED,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ArticlesSendRequest$ = exports.ArticlesSendRequest$outboundSchema = exports.ArticlesSendRequest$inboundSchema = void 0;
|
|
30
|
-
exports.articlesSendRequestToJSON = articlesSendRequestToJSON;
|
|
31
|
-
exports.articlesSendRequestFromJSON = articlesSendRequestFromJSON;
|
|
32
|
-
const z = __importStar(require("zod"));
|
|
33
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
34
|
-
/** @internal */
|
|
35
|
-
exports.ArticlesSendRequest$inboundSchema = z.object({
|
|
36
|
-
id: z.string(),
|
|
37
|
-
});
|
|
38
|
-
/** @internal */
|
|
39
|
-
exports.ArticlesSendRequest$outboundSchema = z.object({
|
|
40
|
-
id: z.string(),
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
-
*/
|
|
46
|
-
var ArticlesSendRequest$;
|
|
47
|
-
(function (ArticlesSendRequest$) {
|
|
48
|
-
/** @deprecated use `ArticlesSendRequest$inboundSchema` instead. */
|
|
49
|
-
ArticlesSendRequest$.inboundSchema = exports.ArticlesSendRequest$inboundSchema;
|
|
50
|
-
/** @deprecated use `ArticlesSendRequest$outboundSchema` instead. */
|
|
51
|
-
ArticlesSendRequest$.outboundSchema = exports.ArticlesSendRequest$outboundSchema;
|
|
52
|
-
})(ArticlesSendRequest$ || (exports.ArticlesSendRequest$ = ArticlesSendRequest$ = {}));
|
|
53
|
-
function articlesSendRequestToJSON(articlesSendRequest) {
|
|
54
|
-
return JSON.stringify(exports.ArticlesSendRequest$outboundSchema.parse(articlesSendRequest));
|
|
55
|
-
}
|
|
56
|
-
function articlesSendRequestFromJSON(jsonString) {
|
|
57
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ArticlesSendRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ArticlesSendRequest' from JSON`);
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=articlessend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articlessend.js","sourceRoot":"","sources":["../../src/models/operations/articlessend.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,8DAMC;AAED,kEAQC;AA7DD,uCAAyB;AACzB,qDAAiD;AAQjD,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAC;AAOH,gBAAgB;AACH,QAAA,kCAAkC,GAI3C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,oBAAoB,CAOpC;AAPD,WAAiB,oBAAoB;IACnC,mEAAmE;IACtD,kCAAa,GAAG,yCAAiC,CAAC;IAC/D,oEAAoE;IACvD,mCAAc,GAAG,0CAAkC,CAAC;AAGnE,CAAC,EAPgB,oBAAoB,oCAApB,oBAAoB,QAOpC;AAED,SAAgB,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,0CAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import * as components from "../components/index.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
export type ArticlesUpdateRequest = {
|
|
6
|
-
id: string;
|
|
7
|
-
articleUpdate: components.ArticleUpdate;
|
|
8
|
-
};
|
|
9
|
-
/** @internal */
|
|
10
|
-
export declare const ArticlesUpdateRequest$inboundSchema: z.ZodType<ArticlesUpdateRequest, z.ZodTypeDef, unknown>;
|
|
11
|
-
/** @internal */
|
|
12
|
-
export type ArticlesUpdateRequest$Outbound = {
|
|
13
|
-
id: string;
|
|
14
|
-
ArticleUpdate: components.ArticleUpdate$Outbound;
|
|
15
|
-
};
|
|
16
|
-
/** @internal */
|
|
17
|
-
export declare const ArticlesUpdateRequest$outboundSchema: z.ZodType<ArticlesUpdateRequest$Outbound, z.ZodTypeDef, ArticlesUpdateRequest>;
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
-
*/
|
|
22
|
-
export declare namespace ArticlesUpdateRequest$ {
|
|
23
|
-
/** @deprecated use `ArticlesUpdateRequest$inboundSchema` instead. */
|
|
24
|
-
const inboundSchema: z.ZodType<ArticlesUpdateRequest, z.ZodTypeDef, unknown>;
|
|
25
|
-
/** @deprecated use `ArticlesUpdateRequest$outboundSchema` instead. */
|
|
26
|
-
const outboundSchema: z.ZodType<ArticlesUpdateRequest$Outbound, z.ZodTypeDef, ArticlesUpdateRequest>;
|
|
27
|
-
/** @deprecated use `ArticlesUpdateRequest$Outbound` instead. */
|
|
28
|
-
type Outbound = ArticlesUpdateRequest$Outbound;
|
|
29
|
-
}
|
|
30
|
-
export declare function articlesUpdateRequestToJSON(articlesUpdateRequest: ArticlesUpdateRequest): string;
|
|
31
|
-
export declare function articlesUpdateRequestFromJSON(jsonString: string): SafeParseResult<ArticlesUpdateRequest, SDKValidationError>;
|
|
32
|
-
//# sourceMappingURL=articlesupdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articlesupdate.d.ts","sourceRoot":"","sources":["../../src/models/operations/articlesupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,UAAU,CAAC,sBAAsB,CAAC;CAClD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CAQrB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,qEAAqE;IAC9D,MAAM,aAAa,yDAAsC,CAAC;IACjE,sEAAsE;IAC/D,MAAM,cAAc,gFAAuC,CAAC;IACnE,gEAAgE;IAChE,KAAY,QAAQ,GAAG,8BAA8B,CAAC;CACvD;AAED,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR;AAED,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ArticlesUpdateRequest$ = exports.ArticlesUpdateRequest$outboundSchema = exports.ArticlesUpdateRequest$inboundSchema = void 0;
|
|
30
|
-
exports.articlesUpdateRequestToJSON = articlesUpdateRequestToJSON;
|
|
31
|
-
exports.articlesUpdateRequestFromJSON = articlesUpdateRequestFromJSON;
|
|
32
|
-
const z = __importStar(require("zod"));
|
|
33
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
34
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
35
|
-
const components = __importStar(require("../components/index.js"));
|
|
36
|
-
/** @internal */
|
|
37
|
-
exports.ArticlesUpdateRequest$inboundSchema = z.object({
|
|
38
|
-
id: z.string(),
|
|
39
|
-
ArticleUpdate: components.ArticleUpdate$inboundSchema,
|
|
40
|
-
}).transform((v) => {
|
|
41
|
-
return (0, primitives_js_1.remap)(v, {
|
|
42
|
-
"ArticleUpdate": "articleUpdate",
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
/** @internal */
|
|
46
|
-
exports.ArticlesUpdateRequest$outboundSchema = z.object({
|
|
47
|
-
id: z.string(),
|
|
48
|
-
articleUpdate: components.ArticleUpdate$outboundSchema,
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return (0, primitives_js_1.remap)(v, {
|
|
51
|
-
articleUpdate: "ArticleUpdate",
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
var ArticlesUpdateRequest$;
|
|
59
|
-
(function (ArticlesUpdateRequest$) {
|
|
60
|
-
/** @deprecated use `ArticlesUpdateRequest$inboundSchema` instead. */
|
|
61
|
-
ArticlesUpdateRequest$.inboundSchema = exports.ArticlesUpdateRequest$inboundSchema;
|
|
62
|
-
/** @deprecated use `ArticlesUpdateRequest$outboundSchema` instead. */
|
|
63
|
-
ArticlesUpdateRequest$.outboundSchema = exports.ArticlesUpdateRequest$outboundSchema;
|
|
64
|
-
})(ArticlesUpdateRequest$ || (exports.ArticlesUpdateRequest$ = ArticlesUpdateRequest$ = {}));
|
|
65
|
-
function articlesUpdateRequestToJSON(articlesUpdateRequest) {
|
|
66
|
-
return JSON.stringify(exports.ArticlesUpdateRequest$outboundSchema.parse(articlesUpdateRequest));
|
|
67
|
-
}
|
|
68
|
-
function articlesUpdateRequestFromJSON(jsonString) {
|
|
69
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ArticlesUpdateRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ArticlesUpdateRequest' from JSON`);
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=articlesupdate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articlesupdate.js","sourceRoot":"","sources":["../../src/models/operations/articlesupdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DH,kEAMC;AAED,sEAQC;AA3ED,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAQrD,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,aAAa,EAAE,UAAU,CAAC,2BAA2B;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,eAAe,EAAE,eAAe;KACjC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,aAAa,EAAE,UAAU,CAAC,4BAA4B;CACvD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,aAAa,EAAE,eAAe;KAC/B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,sBAAsB,CAOtC;AAPD,WAAiB,sBAAsB;IACrC,qEAAqE;IACxD,oCAAa,GAAG,2CAAmC,CAAC;IACjE,sEAAsE;IACzD,qCAAc,GAAG,4CAAoC,CAAC;AAGrE,CAAC,EAPgB,sBAAsB,sCAAtB,sBAAsB,QAOtC;AAED,SAAgB,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,4CAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAgB,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
package/sdk/articles.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
-
import * as components from "../models/components/index.js";
|
|
3
|
-
import * as operations from "../models/operations/index.js";
|
|
4
|
-
import { PageIterator } from "../types/operations.js";
|
|
5
|
-
export declare class Articles extends ClientSDK {
|
|
6
|
-
/**
|
|
7
|
-
* List Articles
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* List articles.
|
|
11
|
-
*/
|
|
12
|
-
list(request: operations.ArticlesListRequest, options?: RequestOptions): Promise<PageIterator<operations.ArticlesListResponse, {
|
|
13
|
-
page: number;
|
|
14
|
-
}>>;
|
|
15
|
-
/**
|
|
16
|
-
* Create Article
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* Create an article.
|
|
20
|
-
*/
|
|
21
|
-
create(request: components.ArticleCreate, options?: RequestOptions): Promise<components.Article>;
|
|
22
|
-
/**
|
|
23
|
-
* Export Articles
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Export organization articles.
|
|
27
|
-
*/
|
|
28
|
-
export(request: operations.ArticlesExportRequest, options?: RequestOptions): Promise<any>;
|
|
29
|
-
/**
|
|
30
|
-
* Get Article
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Get an article by ID.
|
|
34
|
-
*/
|
|
35
|
-
get(request: operations.ArticlesGetRequest, options?: RequestOptions): Promise<components.Article>;
|
|
36
|
-
/**
|
|
37
|
-
* Update Article
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Update an article.
|
|
41
|
-
*/
|
|
42
|
-
update(request: operations.ArticlesUpdateRequest, options?: RequestOptions): Promise<components.Article>;
|
|
43
|
-
/**
|
|
44
|
-
* Delete Article
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Delete an article.
|
|
48
|
-
*/
|
|
49
|
-
delete(request: operations.ArticlesDeleteRequest, options?: RequestOptions): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Get Article Receivers Count
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Get number of potential receivers for an article.
|
|
55
|
-
*/
|
|
56
|
-
receivers(request: operations.ArticlesReceiversRequest, options?: RequestOptions): Promise<components.ArticleReceivers>;
|
|
57
|
-
/**
|
|
58
|
-
* Send Article Preview
|
|
59
|
-
*
|
|
60
|
-
* @remarks
|
|
61
|
-
* Send an article preview by email.
|
|
62
|
-
*/
|
|
63
|
-
preview(request: operations.ArticlesPreviewRequest, options?: RequestOptions): Promise<any>;
|
|
64
|
-
/**
|
|
65
|
-
* Send Article
|
|
66
|
-
*
|
|
67
|
-
* @remarks
|
|
68
|
-
* Send an article by email to all subscribers.
|
|
69
|
-
*/
|
|
70
|
-
send(request: operations.ArticlesSendRequest, options?: RequestOptions): Promise<any>;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=articles.d.ts.map
|
package/sdk/articles.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articles.d.ts","sourceRoot":"","sources":["../src/sdk/articles.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAE5E,qBAAa,QAAS,SAAQ,SAAS;IACrC;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,oBAAoB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAQ3E;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,aAAa,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAQ9B;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;IAQf;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAQ9B;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAQ9B;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAQvC;;;;;OAKG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;IAQf;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;CAOhB"}
|
package/sdk/articles.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Articles = void 0;
|
|
7
|
-
const articlesCreate_js_1 = require("../funcs/articlesCreate.js");
|
|
8
|
-
const articlesDelete_js_1 = require("../funcs/articlesDelete.js");
|
|
9
|
-
const articlesExport_js_1 = require("../funcs/articlesExport.js");
|
|
10
|
-
const articlesGet_js_1 = require("../funcs/articlesGet.js");
|
|
11
|
-
const articlesList_js_1 = require("../funcs/articlesList.js");
|
|
12
|
-
const articlesPreview_js_1 = require("../funcs/articlesPreview.js");
|
|
13
|
-
const articlesReceivers_js_1 = require("../funcs/articlesReceivers.js");
|
|
14
|
-
const articlesSend_js_1 = require("../funcs/articlesSend.js");
|
|
15
|
-
const articlesUpdate_js_1 = require("../funcs/articlesUpdate.js");
|
|
16
|
-
const sdks_js_1 = require("../lib/sdks.js");
|
|
17
|
-
const fp_js_1 = require("../types/fp.js");
|
|
18
|
-
const operations_js_1 = require("../types/operations.js");
|
|
19
|
-
class Articles extends sdks_js_1.ClientSDK {
|
|
20
|
-
/**
|
|
21
|
-
* List Articles
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* List articles.
|
|
25
|
-
*/
|
|
26
|
-
async list(request, options) {
|
|
27
|
-
return (0, operations_js_1.unwrapResultIterator)((0, articlesList_js_1.articlesList)(this, request, options));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Create Article
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Create an article.
|
|
34
|
-
*/
|
|
35
|
-
async create(request, options) {
|
|
36
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesCreate_js_1.articlesCreate)(this, request, options));
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Export Articles
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* Export organization articles.
|
|
43
|
-
*/
|
|
44
|
-
async export(request, options) {
|
|
45
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesExport_js_1.articlesExport)(this, request, options));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Get Article
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Get an article by ID.
|
|
52
|
-
*/
|
|
53
|
-
async get(request, options) {
|
|
54
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesGet_js_1.articlesGet)(this, request, options));
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Update Article
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* Update an article.
|
|
61
|
-
*/
|
|
62
|
-
async update(request, options) {
|
|
63
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesUpdate_js_1.articlesUpdate)(this, request, options));
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Delete Article
|
|
67
|
-
*
|
|
68
|
-
* @remarks
|
|
69
|
-
* Delete an article.
|
|
70
|
-
*/
|
|
71
|
-
async delete(request, options) {
|
|
72
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesDelete_js_1.articlesDelete)(this, request, options));
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Get Article Receivers Count
|
|
76
|
-
*
|
|
77
|
-
* @remarks
|
|
78
|
-
* Get number of potential receivers for an article.
|
|
79
|
-
*/
|
|
80
|
-
async receivers(request, options) {
|
|
81
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesReceivers_js_1.articlesReceivers)(this, request, options));
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Send Article Preview
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* Send an article preview by email.
|
|
88
|
-
*/
|
|
89
|
-
async preview(request, options) {
|
|
90
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesPreview_js_1.articlesPreview)(this, request, options));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Send Article
|
|
94
|
-
*
|
|
95
|
-
* @remarks
|
|
96
|
-
* Send an article by email to all subscribers.
|
|
97
|
-
*/
|
|
98
|
-
async send(request, options) {
|
|
99
|
-
return (0, fp_js_1.unwrapAsync)((0, articlesSend_js_1.articlesSend)(this, request, options));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.Articles = Articles;
|
|
103
|
-
//# sourceMappingURL=articles.js.map
|
package/sdk/articles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articles.js","sourceRoot":"","sources":["../src/sdk/articles.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,kEAA4D;AAC5D,kEAA4D;AAC5D,4DAAsD;AACtD,8DAAwD;AACxD,oEAA8D;AAC9D,wEAAkE;AAClE,8DAAwD;AACxD,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAC7C,0DAA4E;AAE5E,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,oCAAoB,EAAC,IAAA,8BAAY,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,OAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAzJD,4BAyJC"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { PolarCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import { Result } from "../types/fp.js";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Create Article
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* Create an article.
|
|
30
|
-
*/
|
|
31
|
-
export async function articlesCreate(
|
|
32
|
-
client: PolarCore,
|
|
33
|
-
request: components.ArticleCreate,
|
|
34
|
-
options?: RequestOptions,
|
|
35
|
-
): Promise<
|
|
36
|
-
Result<
|
|
37
|
-
components.Article,
|
|
38
|
-
| errors.HTTPValidationError
|
|
39
|
-
| SDKError
|
|
40
|
-
| SDKValidationError
|
|
41
|
-
| UnexpectedClientError
|
|
42
|
-
| InvalidRequestError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| ConnectionError
|
|
46
|
-
>
|
|
47
|
-
> {
|
|
48
|
-
const parsed = safeParse(
|
|
49
|
-
request,
|
|
50
|
-
(value) => components.ArticleCreate$outboundSchema.parse(value),
|
|
51
|
-
"Input validation failed",
|
|
52
|
-
);
|
|
53
|
-
if (!parsed.ok) {
|
|
54
|
-
return parsed;
|
|
55
|
-
}
|
|
56
|
-
const payload = parsed.value;
|
|
57
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
58
|
-
|
|
59
|
-
const path = pathToFunc("/v1/articles/")();
|
|
60
|
-
|
|
61
|
-
const headers = new Headers({
|
|
62
|
-
"Content-Type": "application/json",
|
|
63
|
-
Accept: "application/json",
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const secConfig = await extractSecurity(client._options.accessToken);
|
|
67
|
-
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
68
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
69
|
-
|
|
70
|
-
const context = {
|
|
71
|
-
operationID: "articles:create",
|
|
72
|
-
oAuth2Scopes: [],
|
|
73
|
-
|
|
74
|
-
resolvedSecurity: requestSecurity,
|
|
75
|
-
|
|
76
|
-
securitySource: client._options.accessToken,
|
|
77
|
-
retryConfig: options?.retries
|
|
78
|
-
|| client._options.retryConfig
|
|
79
|
-
|| { strategy: "none" },
|
|
80
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const requestRes = client._createRequest(context, {
|
|
84
|
-
security: requestSecurity,
|
|
85
|
-
method: "POST",
|
|
86
|
-
path: path,
|
|
87
|
-
headers: headers,
|
|
88
|
-
body: body,
|
|
89
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
90
|
-
}, options);
|
|
91
|
-
if (!requestRes.ok) {
|
|
92
|
-
return requestRes;
|
|
93
|
-
}
|
|
94
|
-
const req = requestRes.value;
|
|
95
|
-
|
|
96
|
-
const doResult = await client._do(req, {
|
|
97
|
-
context,
|
|
98
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
99
|
-
retryConfig: context.retryConfig,
|
|
100
|
-
retryCodes: context.retryCodes,
|
|
101
|
-
});
|
|
102
|
-
if (!doResult.ok) {
|
|
103
|
-
return doResult;
|
|
104
|
-
}
|
|
105
|
-
const response = doResult.value;
|
|
106
|
-
|
|
107
|
-
const responseFields = {
|
|
108
|
-
HttpMeta: { Response: response, Request: req },
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const [result] = await M.match<
|
|
112
|
-
components.Article,
|
|
113
|
-
| errors.HTTPValidationError
|
|
114
|
-
| SDKError
|
|
115
|
-
| SDKValidationError
|
|
116
|
-
| UnexpectedClientError
|
|
117
|
-
| InvalidRequestError
|
|
118
|
-
| RequestAbortedError
|
|
119
|
-
| RequestTimeoutError
|
|
120
|
-
| ConnectionError
|
|
121
|
-
>(
|
|
122
|
-
M.json(201, components.Article$inboundSchema),
|
|
123
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
124
|
-
M.fail(["4XX", "5XX"]),
|
|
125
|
-
)(response, { extraFields: responseFields });
|
|
126
|
-
if (!result.ok) {
|
|
127
|
-
return result;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return result;
|
|
131
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { PolarCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Delete Article
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Delete an article.
|
|
31
|
-
*/
|
|
32
|
-
export async function articlesDelete(
|
|
33
|
-
client: PolarCore,
|
|
34
|
-
request: operations.ArticlesDeleteRequest,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
-
Result<
|
|
38
|
-
void,
|
|
39
|
-
| errors.NotPermitted
|
|
40
|
-
| errors.ResourceNotFound
|
|
41
|
-
| errors.HTTPValidationError
|
|
42
|
-
| SDKError
|
|
43
|
-
| SDKValidationError
|
|
44
|
-
| UnexpectedClientError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| RequestAbortedError
|
|
47
|
-
| RequestTimeoutError
|
|
48
|
-
| ConnectionError
|
|
49
|
-
>
|
|
50
|
-
> {
|
|
51
|
-
const parsed = safeParse(
|
|
52
|
-
request,
|
|
53
|
-
(value) => operations.ArticlesDeleteRequest$outboundSchema.parse(value),
|
|
54
|
-
"Input validation failed",
|
|
55
|
-
);
|
|
56
|
-
if (!parsed.ok) {
|
|
57
|
-
return parsed;
|
|
58
|
-
}
|
|
59
|
-
const payload = parsed.value;
|
|
60
|
-
const body = null;
|
|
61
|
-
|
|
62
|
-
const pathParams = {
|
|
63
|
-
id: encodeSimple("id", payload.id, {
|
|
64
|
-
explode: false,
|
|
65
|
-
charEncoding: "percent",
|
|
66
|
-
}),
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const path = pathToFunc("/v1/articles/{id}")(pathParams);
|
|
70
|
-
|
|
71
|
-
const headers = new Headers({
|
|
72
|
-
Accept: "application/json",
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const secConfig = await extractSecurity(client._options.accessToken);
|
|
76
|
-
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
77
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
-
|
|
79
|
-
const context = {
|
|
80
|
-
operationID: "articles:delete",
|
|
81
|
-
oAuth2Scopes: [],
|
|
82
|
-
|
|
83
|
-
resolvedSecurity: requestSecurity,
|
|
84
|
-
|
|
85
|
-
securitySource: client._options.accessToken,
|
|
86
|
-
retryConfig: options?.retries
|
|
87
|
-
|| client._options.retryConfig
|
|
88
|
-
|| { strategy: "none" },
|
|
89
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const requestRes = client._createRequest(context, {
|
|
93
|
-
security: requestSecurity,
|
|
94
|
-
method: "DELETE",
|
|
95
|
-
path: path,
|
|
96
|
-
headers: headers,
|
|
97
|
-
body: body,
|
|
98
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
99
|
-
}, options);
|
|
100
|
-
if (!requestRes.ok) {
|
|
101
|
-
return requestRes;
|
|
102
|
-
}
|
|
103
|
-
const req = requestRes.value;
|
|
104
|
-
|
|
105
|
-
const doResult = await client._do(req, {
|
|
106
|
-
context,
|
|
107
|
-
errorCodes: ["403", "404", "422", "4XX", "5XX"],
|
|
108
|
-
retryConfig: context.retryConfig,
|
|
109
|
-
retryCodes: context.retryCodes,
|
|
110
|
-
});
|
|
111
|
-
if (!doResult.ok) {
|
|
112
|
-
return doResult;
|
|
113
|
-
}
|
|
114
|
-
const response = doResult.value;
|
|
115
|
-
|
|
116
|
-
const responseFields = {
|
|
117
|
-
HttpMeta: { Response: response, Request: req },
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const [result] = await M.match<
|
|
121
|
-
void,
|
|
122
|
-
| errors.NotPermitted
|
|
123
|
-
| errors.ResourceNotFound
|
|
124
|
-
| errors.HTTPValidationError
|
|
125
|
-
| SDKError
|
|
126
|
-
| SDKValidationError
|
|
127
|
-
| UnexpectedClientError
|
|
128
|
-
| InvalidRequestError
|
|
129
|
-
| RequestAbortedError
|
|
130
|
-
| RequestTimeoutError
|
|
131
|
-
| ConnectionError
|
|
132
|
-
>(
|
|
133
|
-
M.nil(204, z.void()),
|
|
134
|
-
M.jsonErr(403, errors.NotPermitted$inboundSchema),
|
|
135
|
-
M.jsonErr(404, errors.ResourceNotFound$inboundSchema),
|
|
136
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
137
|
-
M.fail(["4XX", "5XX"]),
|
|
138
|
-
)(response, { extraFields: responseFields });
|
|
139
|
-
if (!result.ok) {
|
|
140
|
-
return result;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return result;
|
|
144
|
-
}
|