@distilled.cloud/customerio 1.0.0-rc.12 → 1.0.0-rc.13

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/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # @distilled.cloud/customerio
2
+
3
+ Effect-native SDK for [customerio](https://www.npmjs.com/package/@distilled.cloud/customerio).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @distilled.cloud/customerio effect
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```ts
14
+ import { Effect, Layer } from "effect";
15
+ import * as FetchHttpClient from "effect/http/FetchHttpClient";
16
+ import * as Customerio from "@distilled.cloud/customerio";
17
+
18
+ const program = Effect.gen(function* () {
19
+ const result = yield* Customerio.listCampaigns({});
20
+ return result;
21
+ });
22
+
23
+ const Live = Layer.mergeAll(
24
+ FetchHttpClient.layer,
25
+ Customerio.CredentialsFromEnv,
26
+ Customerio.CustomerioProtocol,
27
+ );
28
+
29
+ program.pipe(Effect.provide(Live), Effect.runPromise);
30
+ ```
31
+
32
+ ## Auth
33
+
34
+ Required: `CUSTOMERIO_API_KEY`. Optional: `CUSTOMERIO_API_BASE_URL`. Sent as `Authorization: Bearer`.
package/lib/protocol.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import type * as Layer from "effect/Layer";
2
- import type * as HttpClient from "effect/unstable/http/HttpClient";
3
- import type * as HttpClientError from "effect/unstable/http/HttpClientError";
2
+ import type * as HttpClient from "effect/http/HttpClient";
3
+ import type * as HttpClientError from "effect/http/HttpClientError";
4
4
  import type * as API from "@distilled.cloud/core/api";
5
5
  import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
6
6
  import { Credentials } from "./credentials.ts";
7
- import { UnknownCustomerioError } from "./errors.ts";
7
+ import { UnknownCustomerioError, CustomerioParseError } from "./errors.ts";
8
8
  /**
9
9
  * Error channel shared by every generated Customer.io operation. Generated
10
10
  * service files annotate operations with `API.OperationMethod<I, O,
11
11
  * CustomerioOpError, CustomerioOpContext>` explicitly so the compiler never
12
12
  * infers these back out of the schema generics.
13
13
  */
14
- export type CustomerioOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownCustomerioError | ConfigError | HttpClientError.HttpClientError;
14
+ export type CustomerioOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownCustomerioError | ConfigError | HttpClientError.HttpClientError | CustomerioParseError;
15
15
  /** Context (requirements) shared by every generated Customer.io operation. */
16
16
  export type CustomerioOpContext = Credentials | HttpClient.HttpClient;
17
17
  export declare const CustomerioProtocol: Layer.Layer<API.Protocol>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,KAAK,eAAe,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,sBAAsB,GACtB,WAAW,GACX,eAAe,CAAC,eAAe,CAAC;AAEpC,8EAA8E;AAC9E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AA4CtE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAwBrD,CAAC"}
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,sBAAsB,GACtB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,oBAAoB,CAAC;AAEzB,8EAA8E;AAC9E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AA4CtE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAyBrD,CAAC"}
package/lib/protocol.js CHANGED
@@ -20,7 +20,7 @@ import * as Effect from "effect/Effect";
20
20
  import * as Redacted from "effect/Redacted";
21
21
  import { makeRestProtocol, } from "@distilled.cloud/core/protocol-rest";
22
22
  import { Credentials } from "./credentials.js";
23
- import { UnknownCustomerioError } from "./errors.js";
23
+ import { UnknownCustomerioError, CustomerioParseError } from "./errors.js";
24
24
  /**
25
25
  * Customer.io error bodies are one of:
26
26
  * `{ errors: [{ detail, status, meta? }] }`
@@ -80,5 +80,6 @@ export const CustomerioProtocol = makeRestProtocol({
80
80
  message,
81
81
  body,
82
82
  }),
83
+ parseError: ({ body, cause }) => new CustomerioParseError({ body, cause }),
83
84
  });
84
85
  //# sourceMappingURL=protocol.js.map
@@ -1 +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6 @@
1
+ import { CustomerioParseError } from "./errors.ts";
2
+ import type { CustomerioOpError } from "./protocol.ts";
3
+ export declare const parseErrorIsDeclared: [CustomerioParseError] extends [
4
+ CustomerioOpError
5
+ ] ? true : false;
6
+ //# sourceMappingURL=response-validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-validation.test.d.ts","sourceRoot":"","sources":["../src/response-validation.test.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AA0CvD,eAAO,MAAM,oBAAoB,EAAE,CAAC,oBAAoB,CAAC,SAAS;IAChE,iBAAiB;CAClB,GACG,IAAI,GACJ,KAAY,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { runValidationModes } from "@distilled.cloud/core/testing";
3
+ import * as Effect from "effect/Effect";
4
+ import { fromApiKey } from "./credentials.js";
5
+ import { CustomerioParseError } from "./errors.js";
6
+ import * as Retry from "./retry.js";
7
+ import { getWebhook } from "./services/customerio.js";
8
+ // getWebhook declares `{ name: string; endpoint: string; events: [...]; … }`.
9
+ const run = (body) => runValidationModes(getWebhook({ webhook_id: 1 }).pipe(Retry.none, Effect.provide(fromApiKey({ apiKey: "test" }))), { body });
10
+ describe("Customer.io response validation", () => {
11
+ test("a matching body succeeds unchanged in both modes", async () => {
12
+ const body = {
13
+ id: 1,
14
+ name: "hook",
15
+ endpoint: "https://example.com/hook",
16
+ events: [],
17
+ };
18
+ const { lenient, strict } = await run(JSON.stringify(body));
19
+ expect(lenient).toMatchObject({ _tag: "Success", success: body });
20
+ expect(strict).toMatchObject({ _tag: "Success", success: body });
21
+ });
22
+ test("a body missing required members: lenient returns it, strict fails", async () => {
23
+ const body = {};
24
+ const { lenient, strict } = await run(JSON.stringify(body));
25
+ expect(lenient).toMatchObject({ _tag: "Success", success: body });
26
+ expect(strict._tag).toBe("Failure");
27
+ expect(strict.failure).toBeInstanceOf(CustomerioParseError);
28
+ });
29
+ test("a non-JSON body: lenient returns the text, strict fails", async () => {
30
+ const { lenient, strict } = await run("not json");
31
+ expect(lenient).toMatchObject({ _tag: "Success", success: "not json" });
32
+ expect(strict._tag).toBe("Failure");
33
+ expect(strict.failure).toBeInstanceOf(CustomerioParseError);
34
+ });
35
+ });
36
+ // CustomerioParseError is part of every operation's declared error type.
37
+ export const parseErrorIsDeclared = true;
38
+ //# sourceMappingURL=response-validation.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-validation.test.js","sourceRoot":"","sources":["../src/response-validation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,8EAA8E;AAC9E,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAC3B,kBAAkB,CAChB,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAChC,KAAK,CAAC,IAAI,EACV,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAC/C,EACD,EAAE,IAAI,EAAE,CACT,CAAC;AAEJ,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,IAAI,CAAC,kDAAkD,EAAE,KAAK,IAAI,EAAE;QAClE,MAAM,IAAI,GAAG;YACX,EAAE,EAAE,CAAC;YACL,IAA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C,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,MAAM,CAAE,MAAc,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAIrB,IAAI,CAAC"}
@@ -11825,9 +11825,6 @@ export declare const SendPushRequestSound: any;
11825
11825
  /** The device/messaging platform. */
11826
11826
  export type SendPushRequestCustomDevicePlatform = "ios" | "android";
11827
11827
  export declare const SendPushRequestCustomDevicePlatform: any;
11828
- /** If `"true"`, the device is opted-in and can receive push notifications. */
11829
- export type SendPushRequestCustomDeviceAttributesPushEnabled = "true" | "false";
11830
- export declare const SendPushRequestCustomDeviceAttributesPushEnabled: any;
11831
11828
  /** Attributes that you can reference to segment your audience—like a person's attributes, but specific to a device. These can be either the attributes defined below or custom key-value attributes. */
11832
11829
  export interface SendPushRequestCustomDeviceAttributes {
11833
11830
  /** The operating system, including the version, on the device. */
@@ -11841,7 +11838,7 @@ export interface SendPushRequestCustomDeviceAttributes {
11841
11838
  /** The device's [IETF language code](/journeys/channels/localization/getting-started/#supported-languages), such as `en-MX` or `es-ES`. */
11842
11839
  device_locale?: string;
11843
11840
  /** If `"true"`, the device is opted-in and can receive push notifications. */
11844
- push_enabled?: SendPushRequestCustomDeviceAttributesPushEnabled | (string & {});
11841
+ push_enabled?: boolean;
11845
11842
  }
11846
11843
  export declare const SendPushRequestCustomDeviceAttributes: S.Schema<SendPushRequestCustomDeviceAttributes>;
11847
11844
  /** A device to perform an upsert operation at the time of send. The device will be added/updated on the profile from the Identifiers block. */