@useairfoil/producer-shopify 0.0.1 → 0.2.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/README.md +255 -0
- package/dist/chunk-Bp6m_JJh.js +13 -0
- package/dist/index.d.ts +965 -0
- package/dist/index.js +4 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +49 -0
- package/dist/main.js.map +1 -0
- package/dist/manifest-BFfx2LkS.js +91 -0
- package/dist/manifest-BFfx2LkS.js.map +1 -0
- package/dist/manifest-CPOEExQU.d.ts +34 -0
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.js +3 -0
- package/dist/src-DqmiLrYS.js +984 -0
- package/dist/src-DqmiLrYS.js.map +1 -0
- package/package.json +45 -7
- package/src/api.ts +636 -0
- package/src/auth.ts +116 -0
- package/src/connector.ts +268 -0
- package/src/index.ts +36 -0
- package/src/main.ts +20 -0
- package/src/manifest.ts +86 -0
- package/src/sandbox.ts +38 -0
- package/src/schemas.ts +319 -0
- package/src/start.ts +52 -0
- package/src/throttle.ts +89 -0
- package/src/transient-retry.ts +74 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { _ as ProductWebhookPayloadSchema, a as CartEventSchema, c as MoneyBagSchema, d as ProductDeleteWebhookPayloadSchema, f as ProductOptionSchema, g as ProductVariantSchema, h as ProductVariantInventoryPolicySchema, i as api_exports, l as MoneySchema, m as ProductStatusSchema, n as connector_exports, o as CartLineItemSchema, p as ProductSchema, s as CartWebhookPayloadSchema, u as PageInfoSchema, v as ShopifyNormalize, y as WebhookPayloadSchema } from "./src-DqmiLrYS.js";
|
|
2
|
+
import { n as manifest } from "./manifest-BFfx2LkS.js";
|
|
3
|
+
|
|
4
|
+
export { CartEventSchema, CartLineItemSchema, CartWebhookPayloadSchema, MoneyBagSchema, MoneySchema, PageInfoSchema, ProductDeleteWebhookPayloadSchema, ProductOptionSchema, ProductSchema, ProductStatusSchema, ProductVariantInventoryPolicySchema, ProductVariantSchema, ProductWebhookPayloadSchema, api_exports as ShopifyApiClient, connector_exports as ShopifyConnector, ShopifyNormalize, WebhookPayloadSchema, manifest };
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as layerConfig, t as ShopifyConnector } from "./src-DqmiLrYS.js";
|
|
2
|
+
import { t as ShopifyConfigDef } from "./manifest-BFfx2LkS.js";
|
|
3
|
+
import { ConnectorApp, Publisher, RuntimeConfig, StateStore, Telemetry } from "@useairfoil/connector-kit";
|
|
4
|
+
import { Config, Effect, Layer, Logger, Schema } from "effect";
|
|
5
|
+
import { FetchHttpClient } from "effect/unstable/http";
|
|
6
|
+
import { NodeRuntime, NodeServices } from "@effect/platform-node";
|
|
7
|
+
import { Command } from "effect/unstable/cli";
|
|
8
|
+
import { PgClient } from "@effect/sql-pg";
|
|
9
|
+
import { WingsClient } from "@useairfoil/wings";
|
|
10
|
+
|
|
11
|
+
//#region package.json
|
|
12
|
+
var version = "0.1.1";
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/sandbox.ts
|
|
16
|
+
const ConnectorLayer$1 = layerConfig(ShopifyConfigDef.config);
|
|
17
|
+
const TelemetryLayer$1 = Layer.mergeAll(Telemetry.layerOtlp({ redactedHeaders: ["x-shopify-access-token"] }), Telemetry.layerMetricsConsoleDump());
|
|
18
|
+
const sandboxCommand = Command.make("sandbox", {}, () => Effect.gen(function* () {
|
|
19
|
+
const port = yield* RuntimeConfig.httpPort;
|
|
20
|
+
const entrypoint = yield* ShopifyConnector;
|
|
21
|
+
return yield* ConnectorApp.start(entrypoint, { port });
|
|
22
|
+
}).pipe(Effect.annotateLogs({ component: "producer-shopify" }), Effect.provide(Layer.mergeAll(StateStore.layerMemory, Publisher.layerConsole, ConnectorLayer$1, Logger.layer([Logger.consolePretty()]), TelemetryLayer$1)))).pipe(Command.withDescription("Run the connector locally and log ingested data"));
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/start.ts
|
|
26
|
+
const ConnectorLayer = layerConfig(ShopifyConfigDef.config);
|
|
27
|
+
const TelemetryLayer = Telemetry.layerOtlp({ redactedHeaders: ["x-shopify-access-token"] });
|
|
28
|
+
const PostgresLayer = PgClient.layerConfig({
|
|
29
|
+
url: Config.schema(Schema.Redacted(Schema.NonEmptyString), RuntimeConfig.PlatformRuntimeKey.postgresConnectionString),
|
|
30
|
+
maxConnections: Config.succeed(2),
|
|
31
|
+
connectTimeout: Config.succeed("5 seconds"),
|
|
32
|
+
applicationName: Config.succeed("airfoil-producer-shopify")
|
|
33
|
+
});
|
|
34
|
+
const StateStoreLayer = StateStore.layerSql().pipe(Layer.provide(PostgresLayer));
|
|
35
|
+
const startCommand = Command.make("start", {}, () => Effect.gen(function* () {
|
|
36
|
+
const port = yield* RuntimeConfig.httpPort;
|
|
37
|
+
const entrypoint = yield* ShopifyConnector;
|
|
38
|
+
return yield* ConnectorApp.start(entrypoint, { port }).pipe(Effect.provide(Publisher.layerWingsConfig(entrypoint)));
|
|
39
|
+
}).pipe(Effect.annotateLogs({ component: "producer-shopify" }), Effect.provide(Layer.mergeAll(StateStoreLayer, ConnectorLayer, WingsClient.layerConfig(RuntimeConfig.wingsClient), Logger.layer([Logger.consolePretty()]), TelemetryLayer)), Effect.provide(RuntimeConfig.layerHosted()))).pipe(Command.withDescription("Run the production connector against Wings"));
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/main.ts
|
|
43
|
+
const BootstrapLayer = Layer.mergeAll(FetchHttpClient.layer, NodeServices.layer);
|
|
44
|
+
const program = Command.make("producer-shopify", {}, () => Effect.void).pipe(Command.withSubcommands([startCommand, sandboxCommand]));
|
|
45
|
+
Command.run(program, { version }).pipe(Effect.provide(BootstrapLayer), Effect.scoped, NodeRuntime.runMain);
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { };
|
|
49
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","names":["ConnectorLayer","ShopifyConnector.layerConfig","TelemetryLayer","ShopifyConnector.ShopifyConnector","ShopifyConnector.layerConfig","ShopifyConnector.ShopifyConnector","packageJson.version"],"sources":["../package.json","../src/sandbox.ts","../src/start.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@useairfoil/producer-shopify\",\n \"version\": \"0.1.1\",\n \"repository\": \"useairfoil/typescript-sdk\",\n \"files\": [\n \"dist\",\n \"src\",\n \"README.md\"\n ],\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"default\": \"./dist/index.js\"\n },\n \"./manifest\": {\n \"types\": \"./dist/manifest.d.ts\",\n \"import\": \"./dist/manifest.js\",\n \"default\": \"./dist/manifest.js\"\n }\n },\n \"scripts\": {\n \"build\": \"tsdown\",\n \"docker:build\": \"docker build --load --file Dockerfile --tag airfoil/producer-shopify:local ../..\",\n \"start\": \"tsx --env-file=.env src/main.ts start\",\n \"sandbox\": \"tsx --env-file=.env src/main.ts sandbox\",\n \"test\": \"dotenvx run --ignore=MISSING_ENV_FILE --quiet -- vitest\",\n \"test:ci\": \"dotenvx run --ignore=MISSING_ENV_FILE --quiet -- vitest run\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"@effect/platform-node\": \"catalog:\",\n \"@effect/sql-pg\": \"catalog:\",\n \"@useairfoil/connector-kit\": \"workspace:*\",\n \"@useairfoil/wings\": \"workspace:*\",\n \"effect\": \"catalog:\"\n },\n \"devDependencies\": {\n \"@dotenvx/dotenvx\": \"^1.62.0\",\n \"@effect/vitest\": \"catalog:\",\n \"@types/node\": \"catalog:\",\n \"@useairfoil/effect-vcr\": \"workspace:*\",\n \"tsdown\": \"catalog:\",\n \"tsx\": \"^4.21.0\",\n \"vitest\": \"catalog:\"\n }\n}\n","import {\n ConnectorApp,\n Publisher,\n RuntimeConfig,\n StateStore,\n Telemetry,\n} from \"@useairfoil/connector-kit\";\nimport { Effect, Layer, Logger } from \"effect\";\nimport { Command } from \"effect/unstable/cli\";\n\nimport { ShopifyConnector } from \"./index\";\n\nconst ConnectorLayer = ShopifyConnector.layerConfig(ShopifyConnector.ShopifyConfigDef.config);\n\nconst TelemetryLayer = Layer.mergeAll(\n Telemetry.layerOtlp({ redactedHeaders: [\"x-shopify-access-token\"] }),\n Telemetry.layerMetricsConsoleDump(),\n);\n\nexport const sandboxCommand = Command.make(\"sandbox\", {}, () =>\n Effect.gen(function* () {\n const port = yield* RuntimeConfig.httpPort;\n const entrypoint = yield* ShopifyConnector.ShopifyConnector;\n\n return yield* ConnectorApp.start(entrypoint, { port });\n }).pipe(\n Effect.annotateLogs({ component: \"producer-shopify\" }),\n Effect.provide(\n Layer.mergeAll(\n StateStore.layerMemory,\n Publisher.layerConsole,\n ConnectorLayer,\n Logger.layer([Logger.consolePretty()]),\n TelemetryLayer,\n ),\n ),\n ),\n).pipe(Command.withDescription(\"Run the connector locally and log ingested data\"));\n","import { PgClient } from \"@effect/sql-pg\";\nimport {\n ConnectorApp,\n Publisher,\n RuntimeConfig,\n StateStore,\n Telemetry,\n} from \"@useairfoil/connector-kit\";\nimport { WingsClient } from \"@useairfoil/wings\";\nimport { Config, Effect, Layer, Logger, Schema } from \"effect\";\nimport { Command } from \"effect/unstable/cli\";\n\nimport { ShopifyConnector } from \"./index\";\n\nconst ConnectorLayer = ShopifyConnector.layerConfig(ShopifyConnector.ShopifyConfigDef.config);\n\nconst TelemetryLayer = Telemetry.layerOtlp({\n redactedHeaders: [\"x-shopify-access-token\"],\n});\nconst PostgresLayer = PgClient.layerConfig({\n url: Config.schema(\n Schema.Redacted(Schema.NonEmptyString),\n RuntimeConfig.PlatformRuntimeKey.postgresConnectionString,\n ),\n maxConnections: Config.succeed(2),\n connectTimeout: Config.succeed(\"5 seconds\"),\n applicationName: Config.succeed(\"airfoil-producer-shopify\"),\n});\nconst StateStoreLayer = StateStore.layerSql().pipe(Layer.provide(PostgresLayer));\n\nexport const startCommand = Command.make(\"start\", {}, () =>\n Effect.gen(function* () {\n const port = yield* RuntimeConfig.httpPort;\n const entrypoint = yield* ShopifyConnector.ShopifyConnector;\n\n return yield* ConnectorApp.start(entrypoint, { port }).pipe(\n Effect.provide(Publisher.layerWingsConfig(entrypoint)),\n );\n }).pipe(\n Effect.annotateLogs({ component: \"producer-shopify\" }),\n Effect.provide(\n Layer.mergeAll(\n StateStoreLayer,\n ConnectorLayer,\n WingsClient.layerConfig(RuntimeConfig.wingsClient),\n Logger.layer([Logger.consolePretty()]),\n TelemetryLayer,\n ),\n ),\n Effect.provide(RuntimeConfig.layerHosted()),\n ),\n).pipe(Command.withDescription(\"Run the production connector against Wings\"));\n","import { NodeRuntime, NodeServices } from \"@effect/platform-node\";\nimport { Effect, Layer } from \"effect\";\nimport { Command } from \"effect/unstable/cli\";\nimport { FetchHttpClient } from \"effect/unstable/http\";\n\nimport packageJson from \"../package.json\";\nimport { sandboxCommand } from \"./sandbox\";\nimport { startCommand } from \"./start\";\n\nconst BootstrapLayer = Layer.mergeAll(FetchHttpClient.layer, NodeServices.layer);\n\nconst program = Command.make(\"producer-shopify\", {}, () => Effect.void).pipe(\n Command.withSubcommands([startCommand, sandboxCommand]),\n);\n\nCommand.run(program, { version: packageJson.version }).pipe(\n Effect.provide(BootstrapLayer),\n Effect.scoped,\n NodeRuntime.runMain,\n);\n"],"mappings":";;;;;;;;;;;cAEa;;;;ACUb,MAAMA,mBAAiBC,6BAA+D,OAAO;AAE7F,MAAMC,mBAAiB,MAAM,SAC3B,UAAU,UAAU,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAAC,EACpE,UAAU,yBAAyB,CACpC;AAED,MAAa,iBAAiB,QAAQ,KAAK,WAAW,EAAE,QACtD,OAAO,IAAI,aAAa;CACtB,MAAM,OAAO,OAAO,cAAc;CAClC,MAAM,aAAa,OAAOC;AAE1B,QAAO,OAAO,aAAa,MAAM,YAAY,EAAE,MAAM,CAAC;EACtD,CAAC,KACD,OAAO,aAAa,EAAE,WAAW,oBAAoB,CAAC,EACtD,OAAO,QACL,MAAM,SACJ,WAAW,aACX,UAAU,cACVH,kBACA,OAAO,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,EACtCE,iBACD,CACF,CACF,CACF,CAAC,KAAK,QAAQ,gBAAgB,kDAAkD,CAAC;;;;ACvBlF,MAAM,iBAAiBE,6BAA+D,OAAO;AAE7F,MAAM,iBAAiB,UAAU,UAAU,EACzC,iBAAiB,CAAC,yBAAyB,EAC5C,CAAC;AACF,MAAM,gBAAgB,SAAS,YAAY;CACzC,KAAK,OAAO,OACV,OAAO,SAAS,OAAO,eAAe,EACtC,cAAc,mBAAmB,yBAClC;CACD,gBAAgB,OAAO,QAAQ,EAAE;CACjC,gBAAgB,OAAO,QAAQ,YAAY;CAC3C,iBAAiB,OAAO,QAAQ,2BAA2B;CAC5D,CAAC;AACF,MAAM,kBAAkB,WAAW,UAAU,CAAC,KAAK,MAAM,QAAQ,cAAc,CAAC;AAEhF,MAAa,eAAe,QAAQ,KAAK,SAAS,EAAE,QAClD,OAAO,IAAI,aAAa;CACtB,MAAM,OAAO,OAAO,cAAc;CAClC,MAAM,aAAa,OAAOC;AAE1B,QAAO,OAAO,aAAa,MAAM,YAAY,EAAE,MAAM,CAAC,CAAC,KACrD,OAAO,QAAQ,UAAU,iBAAiB,WAAW,CAAC,CACvD;EACD,CAAC,KACD,OAAO,aAAa,EAAE,WAAW,oBAAoB,CAAC,EACtD,OAAO,QACL,MAAM,SACJ,iBACA,gBACA,YAAY,YAAY,cAAc,YAAY,EAClD,OAAO,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,EACtC,eACD,CACF,EACD,OAAO,QAAQ,cAAc,aAAa,CAAC,CAC5C,CACF,CAAC,KAAK,QAAQ,gBAAgB,6CAA6C,CAAC;;;;AC1C7E,MAAM,iBAAiB,MAAM,SAAS,gBAAgB,OAAO,aAAa,MAAM;AAEhF,MAAM,UAAU,QAAQ,KAAK,oBAAoB,EAAE,QAAQ,OAAO,KAAK,CAAC,KACtE,QAAQ,gBAAgB,CAAC,cAAc,eAAe,CAAC,CACxD;AAED,QAAQ,IAAI,SAAS,EAAWC,SAAqB,CAAC,CAAC,KACrD,OAAO,QAAQ,eAAe,EAC9B,OAAO,QACP,YAAY,QACb"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as Manifest from "@useairfoil/connector-kit/manifest";
|
|
2
|
+
|
|
3
|
+
//#region src/manifest.ts
|
|
4
|
+
const ShopifyConfigDef = Manifest.defineConfig({
|
|
5
|
+
shopDomain: Manifest.string({
|
|
6
|
+
runtimeKey: "SHOPIFY_SHOP_DOMAIN",
|
|
7
|
+
description: "Shopify shop domain, for example example.myshopify.com."
|
|
8
|
+
}),
|
|
9
|
+
apiVersion: Manifest.string({
|
|
10
|
+
runtimeKey: "SHOPIFY_API_VERSION",
|
|
11
|
+
description: "Shopify Admin API version used in GraphQL endpoint URLs.",
|
|
12
|
+
default: "2026-07"
|
|
13
|
+
}),
|
|
14
|
+
clientId: Manifest.string({
|
|
15
|
+
runtimeKey: "SHOPIFY_CLIENT_ID",
|
|
16
|
+
description: "Client ID for the merchant-owned Shopify Dev Dashboard app."
|
|
17
|
+
}),
|
|
18
|
+
clientSecret: Manifest.secret({
|
|
19
|
+
runtimeKey: "SHOPIFY_CLIENT_SECRET",
|
|
20
|
+
description: "Client secret for the merchant-owned Shopify Dev Dashboard app."
|
|
21
|
+
}),
|
|
22
|
+
responseMaxRetries: Manifest.number({
|
|
23
|
+
runtimeKey: "SHOPIFY_RESPONSE_MAX_RETRIES",
|
|
24
|
+
description: "Maximum retries for temporary HTTP responses.",
|
|
25
|
+
default: 5,
|
|
26
|
+
integer: true,
|
|
27
|
+
minimum: 0
|
|
28
|
+
}),
|
|
29
|
+
transportMaxRetries: Manifest.number({
|
|
30
|
+
runtimeKey: "SHOPIFY_TRANSPORT_MAX_RETRIES",
|
|
31
|
+
description: "Maximum retries for connection and transport failures.",
|
|
32
|
+
default: 5,
|
|
33
|
+
integer: true,
|
|
34
|
+
minimum: 0
|
|
35
|
+
}),
|
|
36
|
+
graphqlMaxRetries: Manifest.number({
|
|
37
|
+
runtimeKey: "SHOPIFY_GRAPHQL_MAX_RETRIES",
|
|
38
|
+
description: "Maximum retries for temporary GraphQL errors.",
|
|
39
|
+
default: 5,
|
|
40
|
+
integer: true,
|
|
41
|
+
minimum: 0
|
|
42
|
+
}),
|
|
43
|
+
retryBaseDelayMs: Manifest.number({
|
|
44
|
+
runtimeKey: "SHOPIFY_RETRY_BASE_DELAY_MS",
|
|
45
|
+
description: "Initial delay for HTTP and transport retries.",
|
|
46
|
+
default: 200,
|
|
47
|
+
integer: true,
|
|
48
|
+
minimum: 1
|
|
49
|
+
}),
|
|
50
|
+
graphqlRetryBaseDelayMs: Manifest.number({
|
|
51
|
+
runtimeKey: "SHOPIFY_GRAPHQL_RETRY_BASE_DELAY_MS",
|
|
52
|
+
description: "Initial delay for temporary GraphQL errors.",
|
|
53
|
+
default: 500,
|
|
54
|
+
integer: true,
|
|
55
|
+
minimum: 1
|
|
56
|
+
}),
|
|
57
|
+
retryAfterFallbackSeconds: Manifest.number({
|
|
58
|
+
runtimeKey: "SHOPIFY_RETRY_AFTER_FALLBACK_SECONDS",
|
|
59
|
+
description: "Retry delay used when Shopify omits Retry-After.",
|
|
60
|
+
default: 1,
|
|
61
|
+
integer: true,
|
|
62
|
+
minimum: 1
|
|
63
|
+
}),
|
|
64
|
+
requestTimeoutSeconds: Manifest.number({
|
|
65
|
+
runtimeKey: "SHOPIFY_REQUEST_TIMEOUT_SECONDS",
|
|
66
|
+
description: "Maximum request time including retries.",
|
|
67
|
+
default: 120,
|
|
68
|
+
integer: true,
|
|
69
|
+
minimum: 1
|
|
70
|
+
}),
|
|
71
|
+
webhookSecret: Manifest.secret({
|
|
72
|
+
runtimeKey: "SHOPIFY_WEBHOOK_SECRET",
|
|
73
|
+
description: "Shopify webhook HMAC secret."
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
const manifest = Manifest.define({
|
|
77
|
+
name: "producer-shopify",
|
|
78
|
+
title: "Shopify",
|
|
79
|
+
config: ShopifyConfigDef.spec,
|
|
80
|
+
resources: [{
|
|
81
|
+
name: "products",
|
|
82
|
+
capabilities: ["backfill", "webhook"]
|
|
83
|
+
}, {
|
|
84
|
+
name: "cart_events",
|
|
85
|
+
capabilities: ["webhook"]
|
|
86
|
+
}]
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
export { manifest as n, ShopifyConfigDef as t };
|
|
91
|
+
//# sourceMappingURL=manifest-BFfx2LkS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-BFfx2LkS.js","names":[],"sources":["../src/manifest.ts"],"sourcesContent":["import * as Manifest from \"@useairfoil/connector-kit/manifest\";\n\nexport const ShopifyConfigDef = Manifest.defineConfig({\n shopDomain: Manifest.string({\n runtimeKey: \"SHOPIFY_SHOP_DOMAIN\",\n description: \"Shopify shop domain, for example example.myshopify.com.\",\n }),\n apiVersion: Manifest.string({\n runtimeKey: \"SHOPIFY_API_VERSION\",\n description: \"Shopify Admin API version used in GraphQL endpoint URLs.\",\n default: \"2026-07\",\n }),\n clientId: Manifest.string({\n runtimeKey: \"SHOPIFY_CLIENT_ID\",\n description: \"Client ID for the merchant-owned Shopify Dev Dashboard app.\",\n }),\n clientSecret: Manifest.secret({\n runtimeKey: \"SHOPIFY_CLIENT_SECRET\",\n description: \"Client secret for the merchant-owned Shopify Dev Dashboard app.\",\n }),\n responseMaxRetries: Manifest.number({\n runtimeKey: \"SHOPIFY_RESPONSE_MAX_RETRIES\",\n description: \"Maximum retries for temporary HTTP responses.\",\n default: 5,\n integer: true,\n minimum: 0,\n }),\n transportMaxRetries: Manifest.number({\n runtimeKey: \"SHOPIFY_TRANSPORT_MAX_RETRIES\",\n description: \"Maximum retries for connection and transport failures.\",\n default: 5,\n integer: true,\n minimum: 0,\n }),\n graphqlMaxRetries: Manifest.number({\n runtimeKey: \"SHOPIFY_GRAPHQL_MAX_RETRIES\",\n description: \"Maximum retries for temporary GraphQL errors.\",\n default: 5,\n integer: true,\n minimum: 0,\n }),\n retryBaseDelayMs: Manifest.number({\n runtimeKey: \"SHOPIFY_RETRY_BASE_DELAY_MS\",\n description: \"Initial delay for HTTP and transport retries.\",\n default: 200,\n integer: true,\n minimum: 1,\n }),\n graphqlRetryBaseDelayMs: Manifest.number({\n runtimeKey: \"SHOPIFY_GRAPHQL_RETRY_BASE_DELAY_MS\",\n description: \"Initial delay for temporary GraphQL errors.\",\n default: 500,\n integer: true,\n minimum: 1,\n }),\n retryAfterFallbackSeconds: Manifest.number({\n runtimeKey: \"SHOPIFY_RETRY_AFTER_FALLBACK_SECONDS\",\n description: \"Retry delay used when Shopify omits Retry-After.\",\n default: 1,\n integer: true,\n minimum: 1,\n }),\n requestTimeoutSeconds: Manifest.number({\n runtimeKey: \"SHOPIFY_REQUEST_TIMEOUT_SECONDS\",\n description: \"Maximum request time including retries.\",\n default: 120,\n integer: true,\n minimum: 1,\n }),\n webhookSecret: Manifest.secret({\n runtimeKey: \"SHOPIFY_WEBHOOK_SECRET\",\n description: \"Shopify webhook HMAC secret.\",\n }),\n});\n\nexport type ShopifyConfig = Manifest.ConfigValuesOf<typeof ShopifyConfigDef>;\n\nexport const manifest = Manifest.define({\n name: \"producer-shopify\",\n title: \"Shopify\",\n config: ShopifyConfigDef.spec,\n resources: [\n { name: \"products\", capabilities: [\"backfill\", \"webhook\"] },\n { name: \"cart_events\", capabilities: [\"webhook\"] },\n ],\n});\n"],"mappings":";;;AAEA,MAAa,mBAAmB,SAAS,aAAa;CACpD,YAAY,SAAS,OAAO;EAC1B,YAAY;EACZ,aAAa;EACd,CAAC;CACF,YAAY,SAAS,OAAO;EAC1B,YAAY;EACZ,aAAa;EACb,SAAS;EACV,CAAC;CACF,UAAU,SAAS,OAAO;EACxB,YAAY;EACZ,aAAa;EACd,CAAC;CACF,cAAc,SAAS,OAAO;EAC5B,YAAY;EACZ,aAAa;EACd,CAAC;CACF,oBAAoB,SAAS,OAAO;EAClC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,qBAAqB,SAAS,OAAO;EACnC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,mBAAmB,SAAS,OAAO;EACjC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,kBAAkB,SAAS,OAAO;EAChC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,yBAAyB,SAAS,OAAO;EACvC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,2BAA2B,SAAS,OAAO;EACzC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,uBAAuB,SAAS,OAAO;EACrC,YAAY;EACZ,aAAa;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACV,CAAC;CACF,eAAe,SAAS,OAAO;EAC7B,YAAY;EACZ,aAAa;EACd,CAAC;CACH,CAAC;AAIF,MAAa,WAAW,SAAS,OAAO;CACtC,MAAM;CACN,OAAO;CACP,QAAQ,iBAAiB;CACzB,WAAW,CACT;EAAE,MAAM;EAAY,cAAc,CAAC,YAAY,UAAU;EAAE,EAC3D;EAAE,MAAM;EAAe,cAAc,CAAC,UAAU;EAAE,CACnD;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Manifest from "@useairfoil/connector-kit/manifest";
|
|
2
|
+
import * as effect_Redacted0 from "effect/Redacted";
|
|
3
|
+
|
|
4
|
+
//#region src/manifest.d.ts
|
|
5
|
+
declare const ShopifyConfigDef: Manifest.ConnectorConfigDef<{
|
|
6
|
+
readonly shopDomain: Manifest.ConfigField<string>;
|
|
7
|
+
readonly apiVersion: Manifest.ConfigField<string>;
|
|
8
|
+
readonly clientId: Manifest.ConfigField<string>;
|
|
9
|
+
readonly clientSecret: Manifest.ConfigField<effect_Redacted0.Redacted<string>>;
|
|
10
|
+
readonly responseMaxRetries: Manifest.ConfigField<number>;
|
|
11
|
+
readonly transportMaxRetries: Manifest.ConfigField<number>;
|
|
12
|
+
readonly graphqlMaxRetries: Manifest.ConfigField<number>;
|
|
13
|
+
readonly retryBaseDelayMs: Manifest.ConfigField<number>;
|
|
14
|
+
readonly graphqlRetryBaseDelayMs: Manifest.ConfigField<number>;
|
|
15
|
+
readonly retryAfterFallbackSeconds: Manifest.ConfigField<number>;
|
|
16
|
+
readonly requestTimeoutSeconds: Manifest.ConfigField<number>;
|
|
17
|
+
readonly webhookSecret: Manifest.ConfigField<effect_Redacted0.Redacted<string>>;
|
|
18
|
+
}>;
|
|
19
|
+
type ShopifyConfig = Manifest.ConfigValuesOf<typeof ShopifyConfigDef>;
|
|
20
|
+
declare const manifest: {
|
|
21
|
+
readonly name: "producer-shopify";
|
|
22
|
+
readonly title: "Shopify";
|
|
23
|
+
readonly config: readonly Manifest.ConfigFieldSpec[];
|
|
24
|
+
readonly resources: readonly [{
|
|
25
|
+
readonly name: "products";
|
|
26
|
+
readonly capabilities: readonly ["backfill", "webhook"];
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "cart_events";
|
|
29
|
+
readonly capabilities: readonly ["webhook"];
|
|
30
|
+
}];
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ShopifyConfigDef as n, manifest as r, ShopifyConfig as t };
|
|
34
|
+
//# sourceMappingURL=manifest-CPOEExQU.d.ts.map
|
package/dist/manifest.js
ADDED